brotherton-erpnext/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
430 B
Python
Raw Normal View History

from frappe import qb
def execute():
"""
Clear `tabSingles` and Payment Reconciliation tables of values
"""
singles = qb.DocType("Singles")
qb.from_(singles).delete().where(singles.doctype == "Payment Reconciliation").run()
doctypes = [
"Payment Reconciliation Invoice",
"Payment Reconciliation Payment",
"Payment Reconciliation Allocation",
]
for x in doctypes:
dt = qb.DocType(x)
qb.from_(dt).delete().run()