mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +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):
|
def clear_unallocated_mode_of_payments(self):
|
||||||
self.set("payments", self.get("payments", {"amount": ["not in", [0, None, ""]]}))
|
self.set("payments", self.get("payments", {"amount": ["not in", [0, None, ""]]}))
|
||||||
|
|
||||||
frappe.db.sql(
|
frappe.db.delete("Sales Invoice Payment", filters={"parent": self.name, "amount": 0})
|
||||||
"""delete from `tabSales Invoice Payment` where parent = %s
|
|
||||||
and amount = 0""",
|
|
||||||
self.name,
|
|
||||||
)
|
|
||||||
|
|
||||||
def validate_with_previous_doc(self):
|
def validate_with_previous_doc(self):
|
||||||
super().validate_with_previous_doc(
|
super().validate_with_previous_doc(
|
||||||
|
|||||||
Reference in New Issue
Block a user