Fixed zero decimals handling (fixes #1213)

This commit is contained in:
Bernd Bestel
2020-12-23 19:56:37 +01:00
parent bd185cfa32
commit 2e3c237648
24 changed files with 54 additions and 34 deletions

View File

@@ -330,7 +330,7 @@
@include('components.numberpicker', array(
'id' => 'servings-scale',
'label' => 'Desired servings',
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
'min' => $DEFAULT_MIN_AMOUNT,
'decimals' => $userSettings['stock_decimal_places_amounts'],
'value' => $recipe->desired_servings,
'additionalAttributes' => 'data-recipe-id="' . $recipe->id . '"',