[general ledger][fixes] for against_account value

This commit is contained in:
Nabin Hait 2013-04-29 12:15:35 +05:30
parent 7597330cb6
commit 99883420e7

View File

@ -186,7 +186,6 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
var totals = this.make_summary_row("Totals", this.account); var totals = this.make_summary_row("Totals", this.account);
var grouped_ledgers = {}; var grouped_ledgers = {};
$.each(data, function(i, item) { $.each(data, function(i, item) {
if((me.is_default("company") ? true : me.apply_filter(item, "company")) && if((me.is_default("company") ? true : me.apply_filter(item, "company")) &&
(me.account ? me.is_child_account(me.account, item.account) (me.account ? me.is_child_account(me.account, item.account)
@ -217,8 +216,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
grouped_ledgers[item.account].totals.debit += item.debit; grouped_ledgers[item.account].totals.debit += item.debit;
grouped_ledgers[item.account].totals.credit += item.credit; grouped_ledgers[item.account].totals.credit += item.credit;
} }
if(item.account) {
if(me.account) {
item.against_account = me.voucher_accounts[item.voucher_type + ":" item.against_account = me.voucher_accounts[item.voucher_type + ":"
+ item.voucher_no][(item.debit > 0 ? "credits" : "debits")].join(", "); + item.voucher_no][(item.debit > 0 ? "credits" : "debits")].join(", ");
} }