fix: incorrect filter for BOM (backport #44954) (#44956)

fix: incorrect filter for BOM (#44954)

(cherry picked from commit 9fdeb5f826)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-12-30 23:38:49 +05:30
committed by GitHub
parent c33e07550c
commit 9853bd9ba1

View File

@@ -2,13 +2,13 @@ frappe.listview_settings["BOM"] = {
add_fields: ["is_active", "is_default", "total_cost", "has_variants"], add_fields: ["is_active", "is_default", "total_cost", "has_variants"],
get_indicator: function (doc) { get_indicator: function (doc) {
if (doc.is_active && doc.has_variants) { if (doc.is_active && doc.has_variants) {
return [__("Template"), "orange", "has_variants,=,Yes"]; return [__("Template"), "orange", "has_variants,=,1"];
} else if (doc.is_default) { } else if (doc.is_default) {
return [__("Default"), "green", "is_default,=,Yes"]; return [__("Default"), "green", "is_default,=,1"];
} else if (doc.is_active) { } else if (doc.is_active) {
return [__("Active"), "blue", "is_active,=,Yes"]; return [__("Active"), "blue", "is_active,=,1"];
} else if (!doc.is_active) { } else if (!doc.is_active) {
return [__("Not active"), "gray", "is_active,=,No"]; return [__("Not active"), "gray", "is_active,=,0"];
} }
}, },
}; };