[grid-reports] [page] bug fix for double 'show' call, fixed ledger reports links
diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js
index f00ab1f..dbe6668 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/accounts/doctype/journal_voucher/journal_voucher.js
@@ -56,8 +56,6 @@
if (doc.is_opening == 'Yes') unhide_field('aging_date');
}
-//Set debit and credit to zero on adding new row
-//----------------------------------------------
cur_frm.fields_dict['entries'].grid.onrowadd = function(doc, cdt, cdn){
var d = locals[cdt][cdn];
if(d.idx == 1){
@@ -66,9 +64,6 @@
}
}
-// Get Outstanding of Payable & Sales Invoice
-// -----------------------------------------------
-
cur_frm.cscript.against_voucher = function(doc,cdt,cdn) {
var d = locals[cdt][cdn];
if (d.against_voucher && !flt(d.debit)) {
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index 3985507..769812f 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -22,10 +22,7 @@
});
erpnext.general_ledger = new erpnext.GeneralLedger(wrapper);
-
- wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Accounts")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
diff --git a/public/js/controllers/stock_controller.js b/public/js/controllers/stock_controller.js
index 15d34e0..3021d75 100644
--- a/public/js/controllers/stock_controller.js
+++ b/public/js/controllers/stock_controller.js
@@ -20,13 +20,12 @@
show_stock_ledger: function() {
var me = this;
this.frm.add_custom_button("Show Stock Ledger", function() {
- var args = {
- voucher_no: cur_frm.doc.name,
- from_date: wn.datetime.str_to_user(cur_frm.doc.posting_date),
- to_date: wn.datetime.str_to_user(cur_frm.doc.posting_date)
- };
- wn.set_route('stock-ledger',
- $.map(args, function(val, key) { return key+"="+val; }).join("&&"));
+ wn.route_options = {
+ voucher_no: me.frm.doc.name,
+ from_date: cur_frm.doc.posting_date,
+ to_date: cur_frm.doc.posting_date
+ };
+ wn.set_route('stock-ledger');
}, "icon-bar-chart");
}
});
\ No newline at end of file
diff --git a/stock/page/stock_ledger/stock_ledger.js b/stock/page/stock_ledger/stock_ledger.js
index 438f132..3ca27c5 100644
--- a/stock/page/stock_ledger/stock_ledger.js
+++ b/stock/page/stock_ledger/stock_ledger.js
@@ -22,10 +22,7 @@
});
new erpnext.StockLedger(wrapper);
-
- wrapper.appframe.add_home_breadcrumb()
wrapper.appframe.add_module_icon("Stock")
- wrapper.appframe.add_breadcrumb("icon-bar-chart")
}
wn.require("app/js/stock_grid_report.js");