mirror of
https://github.com/grocy/grocy.git
synced 2025-10-26 14:07:38 +00:00
Fixed zero decimals handling (fixes #1213)
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
@if(!empty($max))
|
||||
max="{{ number_format($max, $decimals, '.', '') }}"
|
||||
@endif
|
||||
step="@if($decimals == 0){{1}}@else{{'.' . str_repeat('0', $decimals - 1) . '1'}}@endif"
|
||||
step="@if($decimals <= 0){{1}}@else{{'.' . str_repeat('0', $decimals - 1) . '1'}}@endif"
|
||||
data-decimals="{{ $decimals }}"
|
||||
@if($isRequired)
|
||||
required
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'display_amount',
|
||||
'label' => $label,
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'min' => $DEFAULT_MIN_AMOUNT,
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'value' => $value,
|
||||
'additionalGroupCssClasses' => 'col-sm-5 col-xs-12 my-0',
|
||||
|
||||
Reference in New Issue
Block a user