Skip to content

Commit

Permalink
fixed new Trial Balance Report
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Doshi committed Oct 11, 2012
1 parent cc798f4 commit 73519e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/js/account_tree_grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({
if(account.rgt - account.lft == 1) {
var parent = me.parent_map[account.name];
while(parent) {
parent_account = me.item_by_name[parent];
var parent_account = me.item_by_name[parent];
$.each(me.columns, function(c, col) {
if (col.formatter == me.currency_formatter) {
parent_account[col.field] =
Expand Down
13 changes: 12 additions & 1 deletion startup/report_data_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,20 @@
},
"Fiscal Year": {
"columns": ["name", "year_start_date",
"adddate(adddate(year_start_date, interval 1 year), interval -1 day) as year_end_date"]
"adddate(adddate(year_start_date, interval 1 year), interval -1 day) as year_end_date"],
"conditions": ["docstatus < 2"],
},

# Accounts
"Account": {
"columns": ["name", "parent_account", "lft", "rgt", "debit_or_credit",
"is_pl_account", "company"],
"conditions": ["docstatus < 2"],
"order_by": "lft"
},
"Cost Center": {
"columns": ["name", "lft", "rgt"],
"conditions": ["docstatus < 2"],
"order_by": "lft"
},
"GL Entry": {
Expand All @@ -55,17 +58,20 @@
"Item": {
"columns": ["name", "if(item_name=name, '', item_name) as item_name",
"item_group as parent_item_group", "stock_uom", "brand", "valuation_method"],
"conditions": ["docstatus < 2"],
"order_by": "name",
"links": {
"parent_item_group": ["Item Group", "name"],
}
},
"Item Group": {
"columns": ["name", "parent_item_group"],
"conditions": ["docstatus < 2"],
"order_by": "lft"
},
"Warehouse": {
"columns": ["name"],
"conditions": ["docstatus < 2"],
"order_by": "name"
},
"Stock Ledger Entry": {
Expand All @@ -84,6 +90,7 @@
"Customer": {
"columns": ["name", "if(customer_name=name, '', customer_name) as customer_name",
"customer_group as parent_customer_group", "territory as parent_territory"],
"conditions": ["docstatus < 2"],
"order_by": "name",
"links": {
"parent_customer_group": ["Customer Group", "name"],
Expand All @@ -92,10 +99,12 @@
},
"Customer Group": {
"columns": ["name", "parent_customer_group"],
"conditions": ["docstatus < 2"],
"order_by": "lft"
},
"Territory": {
"columns": ["name", "parent_territory"],
"conditions": ["docstatus < 2"],
"order_by": "lft"
},
"Sales Invoice": {
Expand All @@ -119,13 +128,15 @@
"Supplier": {
"columns": ["name", "if(supplier_name=name, '', supplier_name) as supplier_name",
"supplier_type as parent_supplier_type"],
"conditions": ["docstatus < 2"],
"order_by": "name",
"links": {
"parent_supplier_type": ["Supplier Type", "name"],
}
},
"Supplier Type": {
"columns": ["name"],
"conditions": ["docstatus < 2"],
"order_by": "name"
},
"Purchase Invoice": {
Expand Down

0 comments on commit 73519e1

Please sign in to comment.