From 3967b28481d8aab6df009a156b9ea17d0ae5d56a Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 21 Aug 2021 20:20:16 +0200 Subject: [PATCH] Fixed stock overview dynamic < min. stock amount background handling --- public/viewjs/stockoverview.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index 855b9364..a2242dfd 100755 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -310,6 +310,10 @@ function RefreshProductRow(productId) { productRow.addClass("table-warning"); } + else if (parseFloat(result.product.min_stock_amount) > 0 && parseFloat(result.stock_amount_aggregated) < parseFloat(result.product.min_stock_amount)) + { + productRow.addClass("table-info"); + } if (result.stock_amount == 0 && result.stock_amount_aggregated == 0 && result.product.min_stock_amount == 0) { @@ -339,11 +343,6 @@ function RefreshProductRow(productId) { $('#product-' + productId + '-opened-amount').text(""); } - - if (result.stock_amount == 0 && result.product.min_stock_amount > 0) - { - productRow.addClass("table-info"); - } } $('#product-' + productId + '-next-due-date').text(result.next_due_date);