minor fix in chart of cost centers
This commit is contained in:
parent
2db8dc922a
commit
4716278f69
@ -21,12 +21,14 @@ def get_children():
|
|||||||
|
|
||||||
# root
|
# root
|
||||||
if args['parent'] in ("Accounts", "Cost Centers"):
|
if args['parent'] in ("Accounts", "Cost Centers"):
|
||||||
|
select_cond = ", root_type, report_type" if args["parent"]=="Accounts" else ""
|
||||||
|
|
||||||
acc = frappe.db.sql(""" select
|
acc = frappe.db.sql(""" select
|
||||||
name as value, is_group as expandable, root_type, report_type
|
name as value, is_group as expandable %s
|
||||||
from `tab%s`
|
from `tab%s`
|
||||||
where ifnull(parent_%s,'') = ''
|
where ifnull(parent_%s,'') = ''
|
||||||
and `company` = %s and docstatus<2
|
and `company` = %s and docstatus<2
|
||||||
order by name""" % (ctype, ctype.lower().replace(' ','_'), '%s'),
|
order by name""" % (select_cond, ctype, ctype.lower().replace(' ','_'), '%s'),
|
||||||
company, as_dict=1)
|
company, as_dict=1)
|
||||||
|
|
||||||
if args["parent"]=="Accounts":
|
if args["parent"]=="Accounts":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user