mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
[grid reports] now show by wn.route_options
This commit is contained in:
@@ -110,7 +110,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
||||
// filter accounts options by company
|
||||
this.filter_inputs.company.change(function() {
|
||||
me.setup_account_filter(this);
|
||||
me.set_route()
|
||||
me.refresh()
|
||||
});
|
||||
|
||||
this.filter_inputs.account.change(function() {
|
||||
@@ -220,13 +220,15 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
||||
}
|
||||
}
|
||||
|
||||
if(date < from_date || item.is_opening=="Yes") {
|
||||
if(!me.voucher_no && (date < from_date || item.is_opening=="Yes")) {
|
||||
opening.debit += item.debit;
|
||||
opening.credit += item.credit;
|
||||
|
||||
grouped_ledgers[item.account].opening.debit += item.debit;
|
||||
grouped_ledgers[item.account].opening.credit += item.credit;
|
||||
|
||||
} else if(date <= to_date) {
|
||||
|
||||
totals.debit += item.debit;
|
||||
totals.credit += item.credit;
|
||||
|
||||
@@ -242,7 +244,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
|
||||
+ item.voucher_no][(item.debit > 0 ? "credits" : "debits")].join(", ");
|
||||
}
|
||||
|
||||
if(me.apply_filters(item) && item.is_opening=="No") {
|
||||
if(me.apply_filters(item) && (me.voucher_no || item.is_opening=="No")) {
|
||||
out.push(item);
|
||||
grouped_ledgers[item.account].entries.push(item);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user