diff --git a/public/viewjs/components/productcard.js b/public/viewjs/components/productcard.js index d2f451a8..3a52ee3f 100644 --- a/public/viewjs/components/productcard.js +++ b/public/viewjs/components/productcard.js @@ -30,7 +30,7 @@ Grocy.Components.ProductCard.Refresh = function(productId) if (productDetails.stock_amount_opened_aggregated > 0) { - $('#productcard-product-stock-opened-amount-aggregated').text(__t('%s opened', productDetails.stock_amount_opened_aggregated)); + $('#productcard-product-stock-opened-amount-aggregated').text(__t('%s opened', productDetails.stock_amount_opened_aggregated.toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }))); } else { @@ -68,7 +68,7 @@ Grocy.Components.ProductCard.Refresh = function(productId) if (stockAmountOpened > 0) { - $('#productcard-product-stock-opened-amount').text(__t('%s opened', stockAmountOpened)); + $('#productcard-product-stock-opened-amount').text(__t('%s opened', stockAmountOpened.toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }))); } else { diff --git a/views/components/productcard.blade.php b/views/components/productcard.blade.php index 3f2f5c12..8d1de460 100644 --- a/views/components/productcard.blade.php +++ b/views/components/productcard.blade.php @@ -45,10 +45,10 @@ class="locale-number locale-number-quantity-amount"> + class="small font-italic">
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)