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

@@ -8,7 +8,7 @@ frappe.ui.form.on("Closing Stock Balance", {
},
generate_closing_balance(frm) {
if (in_list(["Queued", "Failed"], frm.doc.status)) {
if (["Queued", "Failed"].includes(frm.doc.status)) {
frm.add_custom_button(__("Generate Closing Stock Balance"), () => {
frm.call({
method: "enqueue_job",

View File

@@ -1,9 +1,9 @@
frappe.listview_settings["Delivery Trip"] = {
add_fields: ["status"],
get_indicator: function (doc) {
if (in_list(["Cancelled", "Draft"], doc.status)) {
if (["Cancelled", "Draft"].includes(doc.status)) {
return [__(doc.status), "red", "status,=," + doc.status];
} else if (in_list(["In Transit", "Scheduled"], doc.status)) {
} else if (["In Transit", "Scheduled"].includes(doc.status)) {
return [__(doc.status), "orange", "status,=," + doc.status];
} else if (doc.status === "Completed") {
return [__(doc.status), "green", "status,=," + doc.status];

View File

@@ -77,7 +77,7 @@ frappe.ui.form.on('Stock Entry', {
if(!item.item_code) {
frappe.throw(__("Please enter Item Code to get Batch Number"));
} else {
if (in_list(["Material Transfer for Manufacture", "Manufacture", "Repack", "Send to Subcontractor"], doc.purpose)) {
if (["Material Transfer for Manufacture", "Manufacture", "Repack", "Send to Subcontractor"].includes(doc.purpose)) {
var filters = {
'item_code': item.item_code,
'posting_date': frm.doc.posting_date || frappe.datetime.nowdate()