Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-10-11 10:35:56 +02:00
commit b024b42737
2 changed files with 13 additions and 2 deletions

View File

@ -171,7 +171,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({
if(account.rgt - account.lft == 1) { if(account.rgt - account.lft == 1) {
var parent = me.parent_map[account.name]; var parent = me.parent_map[account.name];
while(parent) { while(parent) {
parent_account = me.item_by_name[parent]; var parent_account = me.item_by_name[parent];
$.each(me.columns, function(c, col) { $.each(me.columns, function(c, col) {
if (col.formatter == me.currency_formatter) { if (col.formatter == me.currency_formatter) {
parent_account[col.field] = parent_account[col.field] =

View File

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