mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
replaced get_value
This commit is contained in:
@@ -52,7 +52,7 @@ class DocType(TransactionBase):
|
||||
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
||||
|
||||
def get_company_abbr(self):
|
||||
return get_value('Company', self.doc.company, 'abbr')
|
||||
return webnotes.conn.get_value('Company', self.doc.company, 'abbr')
|
||||
|
||||
def get_receivables_group(self):
|
||||
g = sql("select receivables_group from tabCompany where name=%s", self.doc.company)
|
||||
|
||||
@@ -115,7 +115,7 @@ class DocType(TransactionBase):
|
||||
# ====================
|
||||
def get_invoice_details(self, obj = ''):
|
||||
if obj.doc.company:
|
||||
acc_head = webnotes.conn.sql("select name from `tabAccount` where name = '%s' and docstatus != 2" % (cstr(obj.doc.customer) + " - " + get_value('Company', obj.doc.company, 'abbr')))
|
||||
acc_head = webnotes.conn.sql("select name from `tabAccount` where name = '%s' and docstatus != 2" % (cstr(obj.doc.customer) + " - " + webnotes.conn.get_value('Company', obj.doc.company, 'abbr')))
|
||||
obj.doc.debit_to = acc_head and acc_head[0][0] or ''
|
||||
|
||||
|
||||
@@ -710,11 +710,11 @@ class StatusUpdater:
|
||||
if self.tolerance.get(item_code):
|
||||
return self.tolerance[item_code]
|
||||
|
||||
tolerance = flt(get_value('Item',item_code,'tolerance') or 0)
|
||||
tolerance = flt(webnotes.conn.get_value('Item',item_code,'tolerance') or 0)
|
||||
|
||||
if not tolerance:
|
||||
if self.global_tolerance == None:
|
||||
self.global_tolerance = flt(get_value('Global Defaults',None,'tolerance') or 0)
|
||||
self.global_tolerance = flt(webnotes.conn.get_value('Global Defaults',None,'tolerance') or 0)
|
||||
tolerance = self.global_tolerance
|
||||
|
||||
self.tolerance[item_code] = tolerance
|
||||
|
||||
Reference in New Issue
Block a user