fix: bom stock report color showing always red

This commit is contained in:
Rohit Waghchaure 2020-11-24 16:59:36 +05:30
parent ccd554c19c
commit 5a33f2c394

View File

@ -26,7 +26,7 @@ frappe.query_reports["BOM Stock Report"] = {
"formatter": function(value, row, column, data, default_formatter) {
value = default_formatter(value, row, column, data);
if (column.id == "item") {
if (data["Enough Parts to Build"] > 0) {
if (data["enough_parts_to_build"] > 0) {
value = `<a style='color:green' href="#Form/Item/${data['item']}" data-doctype="Item">${data['item']}</a>`;
} else {
value = `<a style='color:red' href="#Form/Item/${data['item']}" data-doctype="Item">${data['item']}</a>`;