mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 04:45:09 +00:00
fix: move show_general_ledger to Asset Repair form events
(cherry picked from commit ac124bdc7e)
This commit is contained in:
@@ -86,6 +86,26 @@ frappe.ui.form.on("Asset Repair", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
show_general_ledger: function (frm) {
|
||||||
|
if (frm.doc.docstatus > 0) {
|
||||||
|
frm.add_custom_button(
|
||||||
|
__("Accounting Ledger"),
|
||||||
|
function () {
|
||||||
|
frappe.route_options = {
|
||||||
|
voucher_no: frm.doc.name,
|
||||||
|
from_date: frm.doc.completion_date,
|
||||||
|
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
|
||||||
|
company: frm.doc.company,
|
||||||
|
categorize_by: "",
|
||||||
|
show_cancelled_entries: frm.doc.docstatus === 2,
|
||||||
|
};
|
||||||
|
frappe.set_route("query-report", "General Ledger");
|
||||||
|
},
|
||||||
|
__("View")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
repair_status: (frm) => {
|
repair_status: (frm) => {
|
||||||
if (frm.doc.completion_date && frm.doc.repair_status == "Completed") {
|
if (frm.doc.completion_date && frm.doc.repair_status == "Completed") {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
@@ -164,26 +184,6 @@ frappe.ui.form.on("Asset Repair Purchase Invoice", {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
show_general_ledger: (frm) => {
|
|
||||||
if (frm.doc.docstatus > 0) {
|
|
||||||
frm.add_custom_button(
|
|
||||||
__("Accounting Ledger"),
|
|
||||||
function () {
|
|
||||||
frappe.route_options = {
|
|
||||||
voucher_no: frm.doc.name,
|
|
||||||
from_date: frm.doc.posting_date,
|
|
||||||
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
|
|
||||||
company: frm.doc.company,
|
|
||||||
categorize_by: "",
|
|
||||||
show_cancelled_entries: frm.doc.docstatus === 2,
|
|
||||||
};
|
|
||||||
frappe.set_route("query-report", "General Ledger");
|
|
||||||
},
|
|
||||||
__("View")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Asset Repair Consumed Item", {
|
frappe.ui.form.on("Asset Repair Consumed Item", {
|
||||||
|
|||||||
Reference in New Issue
Block a user