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