mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
fix: Rename variables
This commit is contained in:
@@ -227,15 +227,15 @@ class SalesOrder(SellingController):
|
|||||||
check_credit_limit(self.customer, self.company)
|
check_credit_limit(self.customer, self.company)
|
||||||
|
|
||||||
def check_nextdoc_docstatus(self):
|
def check_nextdoc_docstatus(self):
|
||||||
draft_rv = frappe.db.sql_list("""select distinct t1.name
|
linked_invoices = 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)
|
||||||
|
|
||||||
if draft_rv:
|
if linked_invoices:
|
||||||
draft_rv = [get_link_to_form("Sales Invoice", si) for si in draft_rv]
|
linked_invoices = [get_link_to_form("Sales Invoice", si) for si in linked_invoices]
|
||||||
frappe.throw(_("Sales Invoice {0} must be deleted before cancelling this Sales Order")
|
frappe.throw(_("Sales Invoice {0} must be deleted before cancelling this Sales Order")
|
||||||
.format(", ".join(draft_rv)))
|
.format(", ".join(linked_invoices)))
|
||||||
|
|
||||||
def check_modified_date(self):
|
def check_modified_date(self):
|
||||||
mod_db = frappe.db.get_value("Sales Order", self.name, "modified")
|
mod_db = frappe.db.get_value("Sales Order", self.name, "modified")
|
||||||
|
|||||||
Reference in New Issue
Block a user