mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
refactor(sales_invoice): Replace SQL with orm in get_company_abbr (#55384)
This commit is contained in:
@@ -994,7 +994,7 @@ class SalesInvoice(SellingController):
|
|||||||
return pos
|
return pos
|
||||||
|
|
||||||
def get_company_abbr(self):
|
def get_company_abbr(self):
|
||||||
return frappe.db.sql("select abbr from tabCompany where name=%s", self.company)[0][0]
|
return frappe.db.get_value("Company", self.company, "abbr")
|
||||||
|
|
||||||
def validate_debit_to_acc(self):
|
def validate_debit_to_acc(self):
|
||||||
if not self.debit_to:
|
if not self.debit_to:
|
||||||
|
|||||||
Reference in New Issue
Block a user