Update bom_stock_report.js

This commit is contained in:
rohitwaghchaure 2020-11-23 15:40:06 +05:30 committed by GitHub
parent 610d9ca649
commit f9a44000d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,8 +25,8 @@ 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 (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>`;