2019-11-06 18:12:29 +05:30
|
|
|
import frappe
|
|
|
|
|
2021-09-02 16:44:59 +05:30
|
|
|
|
2019-11-06 18:12:29 +05:30
|
|
|
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;"""
|
|
|
|
)
|