2019-11-06 12:42:29 +00:00
|
|
|
import frappe
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2019-11-06 12:42:29 +00:00
|
|
|
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;"""
|
|
|
|
)
|