Files
schuetz3-erpnext/erpnext/patches/v12_0/set_payment_entry_status.py
Ankush Menat c07713b860 style: bulk format code with black
v13 port because otherwise backports will result in conflicts always
2022-03-29 17:29:34 +05:30

13 lines
240 B
Python

import frappe
def execute():
frappe.reload_doctype("Payment Entry")
frappe.db.sql(
"""update `tabPayment Entry` set status = CASE
WHEN docstatus = 1 THEN 'Submitted'
WHEN docstatus = 2 THEN 'Cancelled'
ELSE 'Draft'
END;"""
)