chore: clear singles table and reconciliation related tables

(cherry picked from commit f31002636b)

# Conflicts:
#	erpnext/patches.txt
This commit is contained in:
ruthra kumar
2023-11-18 08:10:09 +05:30
committed by Mergify
parent 454d789232
commit 59773acdd2
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
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()