mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
[cleanup] #402 changed fieldname company_name to company in Cost Center
This commit is contained in:
@@ -310,7 +310,7 @@ erpnext.AccountsChart = Class.extend({
|
||||
var node = me.selected_node();
|
||||
|
||||
v.parent_cost_center = node.data('label');
|
||||
v.company_name = me.company;
|
||||
v.company = me.company;
|
||||
|
||||
wn.call({
|
||||
args: v,
|
||||
|
||||
@@ -28,16 +28,14 @@ def get_children():
|
||||
args = webnotes.form_dict
|
||||
ctype, company = args['ctype'], args['comp']
|
||||
|
||||
company_field = ctype=='Account' and 'company' or 'company_name'
|
||||
|
||||
# root
|
||||
if args['parent'] in ("Accounts", "Cost Centers"):
|
||||
acc = webnotes.conn.sql(""" select
|
||||
name as value, if(group_or_ledger='Group', 1, 0) as expandable
|
||||
from `tab%s`
|
||||
where ifnull(parent_%s,'') = ''
|
||||
and %s = %s and docstatus<2
|
||||
order by name""" % (ctype, ctype.lower().replace(' ','_'), company_field, '%s'),
|
||||
and `company` = %s and docstatus<2
|
||||
order by name""" % (ctype, ctype.lower().replace(' ','_'), '%s'),
|
||||
company, as_dict=1)
|
||||
else:
|
||||
# other
|
||||
|
||||
Reference in New Issue
Block a user