Fixed stock overview dynamic < min. stock amount background handling

This commit is contained in:
Bernd Bestel 2021-08-21 20:20:16 +02:00
parent 2d67adedd7
commit 3967b28481
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -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);