refactor: usage of in_list

(cherry picked from commit d238751e6b)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.js
#	erpnext/buying/doctype/purchase_order/purchase_order.js
#	erpnext/public/js/controllers/accounts.js
#	erpnext/public/js/controllers/buying.js
#	erpnext/public/js/controllers/transaction.js
#	erpnext/public/js/utils/sales_common.js
#	erpnext/templates/form_grid/item_grid.html
This commit is contained in:
barredterra
2024-03-19 12:03:36 +01:00
committed by Mergify
parent 93fe136386
commit 7f2a54d95b
22 changed files with 1120 additions and 39 deletions

View File

@@ -34,7 +34,7 @@ frappe.ui.form.on("Import Supplier Invoice", {
},
toggle_read_only_fields: function (frm) {
if (in_list(["File Import Completed", "Processing File Data"], frm.doc.status)) {
if (["File Import Completed", "Processing File Data"].includes(frm.doc.status)) {
cur_frm.set_read_only();
cur_frm.refresh_fields();
frm.set_df_property("import_invoices", "hidden", 1);