refactor: usage of in_list

(cherry picked from commit d238751e6b)
This commit is contained in:
barredterra
2024-03-19 12:03:36 +01:00
committed by Mergify
parent 0bdda1226f
commit f0e00daa1c
22 changed files with 59 additions and 59 deletions

View File

@@ -291,7 +291,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
this.frm.fields_dict.items_section.wrapper.removeClass("hide-border");
}
if (!in_list(["Closed", "Delivered"], doc.status)) {
if (!["Closed", "Delivered"].includes(doc.status)) {
if (
this.frm.doc.status !== "Closed" &&
flt(this.frm.doc.per_received, 2) < 100 &&
@@ -336,7 +336,7 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
this.frm.page.set_inner_btn_group_as_primary(__("Status"));
}
} else if (in_list(["Closed", "Delivered"], doc.status)) {
} else if (["Closed", "Delivered"].includes(doc.status)) {
if (this.frm.has_perm("submit")) {
this.frm.add_custom_button(
__("Re-open"),