Skip to content

Commit

Permalink
fix: incorrect color in the BOM Stock Report
Browse files Browse the repository at this point in the history
(cherry picked from commit a8f03eb)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Feb 23, 2023
1 parent 9c43e3a commit 001ed9e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ 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["in_stock_qty"] >= data["required_qty"]) {
value = `<a style='color:green' href="/app/item/${data['item']}" data-doctype="Item">${data['item']}</a>`;
} else {
value = `<a style='color:red' href="/app/item/${data['item']}" data-doctype="Item">${data['item']}</a>`;
Expand Down

0 comments on commit 001ed9e

Please sign in to comment.