brotherton-erpnext/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py
ruthra kumar 192343dec2 chore: clear singles table and reconciliation related tables
(cherry picked from commit f31002636bf21a3599ee5a7372db4d0cb3dbfad9)
2023-12-04 06:31:08 +00:00

18 lines
430 B
Python

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()