this.add_filter({fieldname:'show_group_ledger',label:'Show Group/Ledger',fieldtype:'Select',options:'Only Groups'+NEWLINE+'Only Ledgers'+NEWLINE+'Both But Without Group Balance'+NEWLINE+'Both With Balance',ignore:1,parent:'Account','report_default':'Both With Balance','in_first_page':1,single_select:1});
this.add_filter({fieldname:'show_zero_balance',label:'Show Zero Balance',fieldtype:'Select',options:'Yes'+NEWLINE+'No',ignore:1,parent:'Account','report_default':'Yes','in_first_page':1,single_select:1});
varq="SELECT name FROM tabAccount WHERE group_or_ledger = 'Ledger' and company = '"+comp+"' and docstatus != 2 ORDER BY lft";
}elseif(g_or_l=='Only Groups'){
varq="SELECT CONCAT( REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM tabAccount AS node,tabAccount AS parent WHERE (node.lft BETWEEN parent.lft AND parent.rgt) and node.group_or_ledger = 'Group' and node.company = '"+comp+"' and node.docstatus != 2 GROUP BY node.name ORDER BY node.lft";
}else{
varq="SELECT CONCAT( REPEAT(' ', COUNT(parent.name) - 1), node.name) AS name FROM tabAccount AS node,tabAccount AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt and node.company = '"+comp+"' and node.docstatus != 2 GROUP BY node.name ORDER BY node.lft";