mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 20:49:19 +00:00
fix: Display draft invoices only once in error message
This commit is contained in:
@@ -249,7 +249,7 @@ class SalesOrder(SellingController):
|
|||||||
frappe.throw(_("Sales Invoice {0} must be cancelled before cancelling this Sales Order")
|
frappe.throw(_("Sales Invoice {0} must be cancelled before cancelling this Sales Order")
|
||||||
.format(", ".join(submit_rv)))
|
.format(", ".join(submit_rv)))
|
||||||
|
|
||||||
draft_rv = frappe.db.sql_list("""select t1.name
|
draft_rv = frappe.db.sql_list("""select distinct t1.name
|
||||||
from `tabSales Invoice` t1,`tabSales Invoice Item` t2
|
from `tabSales Invoice` t1,`tabSales Invoice Item` t2
|
||||||
where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 0""",
|
where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 0""",
|
||||||
self.name)
|
self.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user