brotherton-erpnext/erpnext/patches/v12_0/set_payment_entry_status.py

8 lines
193 B
Python

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