mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
refactor(sales_invoice): replace sql with orm in clear_unallocated_mo… (#55383)
This commit is contained in:
@@ -1034,11 +1034,7 @@ class SalesInvoice(SellingController):
|
||||
def clear_unallocated_mode_of_payments(self):
|
||||
self.set("payments", self.get("payments", {"amount": ["not in", [0, None, ""]]}))
|
||||
|
||||
frappe.db.sql(
|
||||
"""delete from `tabSales Invoice Payment` where parent = %s
|
||||
and amount = 0""",
|
||||
self.name,
|
||||
)
|
||||
frappe.db.delete("Sales Invoice Payment", filters={"parent": self.name, "amount": 0})
|
||||
|
||||
def validate_with_previous_doc(self):
|
||||
super().validate_with_previous_doc(
|
||||
|
||||
Reference in New Issue
Block a user