mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
fix: Add view ledger button for cancelled docs (#22432)
* fix: Add view ledger button for cancelled docs * fix: Add moddified to date in Stock Ledger
This commit is contained in:
@@ -9,12 +9,15 @@ frappe.ui.form.on(cur_frm.doctype, {
|
||||
}
|
||||
|
||||
if (['Loan Disbursement', 'Loan Repayment', 'Loan Interest Accrual'].includes(frm.doc.doctype)
|
||||
&& frm.doc.docstatus == 1) {
|
||||
&& frm.doc.docstatus > 0) {
|
||||
|
||||
frm.add_custom_button(__("Accounting Ledger"), function() {
|
||||
frappe.route_options = {
|
||||
voucher_no: frm.doc.name,
|
||||
company: frm.doc.company
|
||||
company: frm.doc.company,
|
||||
from_date: frm.doc.posting_date,
|
||||
to_date: moment(frm.doc.modified).format('YYYY-MM-DD'),
|
||||
show_cancelled_entries: frm.doc.docstatus === 2
|
||||
};
|
||||
|
||||
frappe.set_route("query-report", "General Ledger");
|
||||
|
||||
Reference in New Issue
Block a user