fix: Add view ledger button for cancelled docs (#22433)

* fix: Add view ledger button for cancelled docs

* fix: Add moddified to date in Stock Ledger
This commit is contained in:
Deepesh Garg
2020-06-25 15:37:04 +05:30
committed by GitHub
parent 8d8ce63be7
commit 4c726b25ee
8 changed files with 37 additions and 24 deletions

View File

@@ -55,8 +55,9 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
frappe.route_options = {
voucher_no: me.frm.doc.name,
from_date: me.frm.doc.posting_date,
to_date: me.frm.doc.posting_date,
company: me.frm.doc.company
to_date: moment(me.frm.doc.modified).format('YYYY-MM-DD'),
company: me.frm.doc.company,
show_cancelled_entries: me.frm.doc.docstatus === 2
};
frappe.set_route("query-report", "Stock Ledger");
}, __("View"));
@@ -71,9 +72,10 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
frappe.route_options = {
voucher_no: me.frm.doc.name,
from_date: me.frm.doc.posting_date,
to_date: me.frm.doc.posting_date,
to_date: moment(me.frm.doc.modified).format('YYYY-MM-DD'),
company: me.frm.doc.company,
group_by: "Group by Voucher (Consolidated)"
group_by: "Group by Voucher (Consolidated)",
show_cancelled_entries: me.frm.doc.docstatus === 2
};
frappe.set_route("query-report", "General Ledger");
}, __("View"));