mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
Merge pull request #40543 from frappe/mergify/bp/version-14-hotfix/pr-40542
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user