mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Exclude products with hide_on_stock_overview enabled in current stock info on /stockoverview (fixes #2250)
This commit is contained in:
@@ -236,7 +236,7 @@ function RefreshStatistics()
|
||||
{
|
||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
{
|
||||
$("#info-current-stock").text(__n(result.length, '%s Product', '%s Products'));
|
||||
$("#info-current-stock").text(__n(result.filter(x => !BoolVal(x.product.hide_on_stock_overview)).length, '%s Product', '%s Products'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -245,7 +245,8 @@ function RefreshStatistics()
|
||||
{
|
||||
valueSum += element.value;
|
||||
});
|
||||
$("#info-current-stock").text(__n(result.length, '%s Product', '%s Products') + ", " + __t('%s total value', valueSum.toLocaleString(undefined, { style: "currency", currency: Grocy.Currency })));
|
||||
|
||||
$("#info-current-stock").text(__n(result.filter(x => !BoolVal(x.product.hide_on_stock_overview)).length, '%s Product', '%s Products') + ", " + __t('%s total value', valueSum.toLocaleString(undefined, { style: "currency", currency: Grocy.Currency })));
|
||||
}
|
||||
},
|
||||
function(xhr)
|
||||
|
Reference in New Issue
Block a user