Merge pull request #40543 from frappe/mergify/bp/version-14-hotfix/pr-40542

This commit is contained in:
Raffael Meyer
2024-06-18 12:51:55 +02:00
committed by GitHub
25 changed files with 63 additions and 63 deletions

View File

@@ -78,7 +78,7 @@ frappe.ui.form.on("Asset", {
frm.events.make_schedules_editable(frm);
if (frm.doc.docstatus == 1) {
if (in_list(["Submitted", "Partially Depreciated", "Fully Depreciated"], frm.doc.status)) {
if (["Submitted", "Partially Depreciated", "Fully Depreciated"].includes(frm.doc.status)) {
frm.add_custom_button(
__("Transfer Asset"),
function () {
@@ -280,7 +280,7 @@ frappe.ui.form.on("Asset", {
if (v.journal_entry) {
asset_values.push(asset_value);
} else {
if (in_list(["Scrapped", "Sold"], frm.doc.status)) {
if (["Scrapped", "Sold"].includes(frm.doc.status)) {
asset_values.push(null);
} else {
asset_values.push(asset_value);
@@ -312,7 +312,7 @@ frappe.ui.form.on("Asset", {
});
}
if (in_list(["Scrapped", "Sold"], frm.doc.status)) {
if (["Scrapped", "Sold"].includes(frm.doc.status)) {
x_intervals.push(frappe.format(frm.doc.disposal_date, { fieldtype: "Date" }));
asset_values.push(0);
}