mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
[grid-reports] [page] bug fix for double 'show' call, fixed ledger reports links
This commit is contained in:
@@ -20,13 +20,12 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
|
||||
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");
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user