Merge pull request #23980 from rohitwaghchaure/color-not-showing-in-bom-stock-report-develop

fix: bom stock report color issue
This commit is contained in:
rohitwaghchaure
2020-11-23 16:43:32 +05:30
committed by GitHub

View File

@@ -25,11 +25,11 @@ 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){
value = `<a style='color:green' href="#Form/Item/${data['Item']}" data-doctype="Item">${data['Item']}</a>`
if (column.id == "item") {
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>`
value = `<a style='color:red' href="#Form/Item/${data['item']}" data-doctype="Item">${data['item']}</a>`;
}
}
return value