refactor: usage of in_list

This commit is contained in:
barredterra
2024-03-19 12:03:36 +01:00
parent 3dd6686d8a
commit d238751e6b
22 changed files with 59 additions and 59 deletions

View File

@@ -129,7 +129,7 @@ erpnext.buying = {
}
toggle_subcontracting_fields() {
if (in_list(['Purchase Receipt', 'Purchase Invoice'], this.frm.doc.doctype)) {
if (['Purchase Receipt', 'Purchase Invoice'].includes(this.frm.doc.doctype)) {
this.frm.fields_dict.supplied_items.grid.update_docfield_property('consumed_qty',
'read_only', this.frm.doc.__onload && this.frm.doc.__onload.backflush_based_on === 'BOM');