mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed calories locale number display (fixes #1802)
This commit is contained in:
parent
bab0e1d5fb
commit
cc2a137783
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
- Fixed that consuming recipes was possible when not all ingredients were in-stock (and this potentially consumed some of the in-stock ingredients; not matching the message "nothing removed")
|
- Fixed that consuming recipes was possible when not all ingredients were in-stock (and this potentially consumed some of the in-stock ingredients; not matching the message "nothing removed")
|
||||||
- Fixed that the price of the "Produces product"-product, which is added to stock on consuming a recipe, was wrong (was the recipe total costs multiplied by the serving amount instead of only the recipe total costs)
|
- Fixed that the price of the "Produces product"-product, which is added to stock on consuming a recipe, was wrong (was the recipe total costs multiplied by the serving amount instead of only the recipe total costs)
|
||||||
|
- Fixed that calories of recipe ingredients were displayed with an indefinite number of decimal places
|
||||||
|
|
||||||
### Meal plan
|
### Meal plan
|
||||||
|
|
||||||
|
@ -637,7 +637,7 @@ function RefreshLocaleNumberDisplay(rootSelector = "#page-content")
|
|||||||
}
|
}
|
||||||
|
|
||||||
var value = parseFloat(text);
|
var value = parseFloat(text);
|
||||||
$(this).text(value.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 2 }));
|
$(this).text(value.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 0 }));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
RefreshLocaleNumberDisplay();
|
RefreshLocaleNumberDisplay();
|
||||||
|
@ -481,7 +481,7 @@
|
|||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
@if($selectedRecipePosition->need_fulfilled == 1 && GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) <span class="float-right font-italic ml-2 locale-number locale-number-currency">{{ $selectedRecipePosition->costs }}</span> @endif
|
@if($selectedRecipePosition->need_fulfilled == 1 && GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) <span class="float-right font-italic ml-2 locale-number locale-number-currency">{{ $selectedRecipePosition->costs }}</span> @endif
|
||||||
<span class="float-right font-italic"><span class="locale-number locale-number-quantity-amount">{{ $selectedRecipePosition->calories }} {{ $__t('Calories') }}</span></span>
|
<span class="float-right font-italic"><span class="locale-number locale-number-generic">{{ $selectedRecipePosition->calories }}</span> {{ $__t('Calories') }}</span>
|
||||||
@if(!empty($selectedRecipePosition->recipe_variable_amount))
|
@if(!empty($selectedRecipePosition->recipe_variable_amount))
|
||||||
<div class="small text-muted font-italic">{{ $__t('Variable amount') }}</div>
|
<div class="small text-muted font-italic">{{ $__t('Variable amount') }}</div>
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user