mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Bug fix for zero quantity pricing (#4765)
- Fix default value for formatPriceRange method - Display empty value in table
This commit is contained in:
parent
7793b3505d
commit
1c3d037baf
@ -76,7 +76,11 @@ function formatPriceRange(price_min, price_max, options={}) {
|
|||||||
var p_min = price_min || price_max;
|
var p_min = price_min || price_max;
|
||||||
var p_max = price_max || price_min;
|
var p_max = price_max || price_min;
|
||||||
|
|
||||||
var quantity = options.quantity || 1;
|
var quantity = 1;
|
||||||
|
|
||||||
|
if ('quantity' in options) {
|
||||||
|
quantity = options.quantity;
|
||||||
|
}
|
||||||
|
|
||||||
if (p_min == null && p_max == null) {
|
if (p_min == null && p_max == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -2072,6 +2072,10 @@ function loadStockTable(table, options) {
|
|||||||
currency = baseCurrency();
|
currency = baseCurrency();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (row.quantity <= 0) {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
|
||||||
return formatPriceRange(
|
return formatPriceRange(
|
||||||
min_price,
|
min_price,
|
||||||
max_price,
|
max_price,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user