test: add test for receivable summary report

This commit is contained in:
ruthra kumar
2023-08-21 14:54:03 +05:30
parent 0dc5e5c430
commit af52f21ece
2 changed files with 216 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import frappe
from frappe import qb
from erpnext.stock.doctype.item.test_item import create_item
@@ -103,3 +104,15 @@ class AccountsTestMixin:
)
new_acc.save()
setattr(self, acc.attribute_name, new_acc.name)
def clear_old_entries(self):
doctype_list = [
"GL Entry",
"Payment Ledger Entry",
"Sales Invoice",
"Purchase Invoice",
"Payment Entry",
"Journal Entry",
]
for doctype in doctype_list:
qb.from_(qb.DocType(doctype)).delete().where(qb.DocType(doctype).company == self.company).run()