2019-11-06 12:42:29 +00:00
|
|
|
import frappe
|
|
|
|
|
|
|
|
def execute():
|
2019-11-07 07:31:45 +00:00
|
|
|
frappe.reload_doctype("Payment Entry")
|
2019-11-06 12:42:29 +00:00
|
|
|
frappe.db.sql("""update `tabPayment Entry` set status = CASE
|
|
|
|
WHEN docstatus = 1 THEN 'Submitted'
|
|
|
|
WHEN docstatus = 2 THEN 'Cancelled'
|
|
|
|
ELSE 'Draft'
|
|
|
|
END;""")
|