Remove pricing rule from items
diff --git a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py
index a9ecaaf..70ba5a3 100644
--- a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py
+++ b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py
@@ -19,14 +19,14 @@
def test_get_mode_of_payments(self):
si = frappe.get_all("Sales Invoice", filters={"company": "_Test Company", "customer": "_Test Customer"}, fields=["name", "docstatus"])
- print(si)
filters = get_filters()
for invoice in si[:-2]:
doc = frappe.get_doc("Sales Invoice", invoice.name)
- print(doc.__dict__)
new_doc = frappe.copy_doc(doc)
new_doc.ignore_pricing_rule = 1
+ for item in new_doc.items:
+ item.pricing_rule = ""
new_doc.insert()
new_doc.submit()
try:
@@ -69,6 +69,9 @@
for invoice in si[:-2]:
doc = frappe.get_doc("Sales Invoice", invoice.name)
new_doc = frappe.copy_doc(doc)
+ new_doc.ignore_pricing_rule = 1
+ for item in new_doc.items:
+ item.pricing_rule = ""
new_doc.insert()
new_doc.submit()
try: