mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Exclude products with hide_on_stock_overview enabled in current stock info on /stockoverview (fixes #2250)
This commit is contained in:
parent
de4c6e8b60
commit
d05038e311
@ -43,6 +43,7 @@
|
||||
- Fixed that the consumed amount was wrong, when consuming multiple substituted subproducts at once and when multiple/different conversion factors were involved
|
||||
- Fixed that for a product's average price, only currently in-stock items were considered, not already consumed ones
|
||||
- Fixed that when copying a product, some fields (like "Default consume location" or "Disable own stock) weren't copied along
|
||||
- Fixed that the total product count on the stock overview page also included products with "Never show on stock overview" enabled
|
||||
|
||||
### Shopping list
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user