mirror of
https://github.com/grocy/grocy.git
synced 2025-10-26 14:07:38 +00:00
Allow price up to 4 decimals instead of 2 (#1077)
* Allow price to be 4 decimals * remove logging * Finalize custom decimal places by user setting * Typo Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
value="{{ $value }}"
|
||||
min="{{ number_format($min, $decimals, '.', '') }}"
|
||||
max="{{ number_format($max, $decimals, '.', '') }}"
|
||||
step="@if($decimals == 0){{1}}@else{{'.' . substr('0000000001', -$decimals)}}@endif"
|
||||
step="@if($decimals == 0){{1}}@else{{'.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1'}}@endif"
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'display_amount',
|
||||
'label' => 'Amount',
|
||||
'min' => 0.0001,
|
||||
'decimals' => 4,
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'value' => $value,
|
||||
'invalidFeedback' => $__t('This cannot be negative and must be an integral number'),
|
||||
'additionalGroupCssClasses' => 'col-4 mb-1',
|
||||
|
||||
Reference in New Issue
Block a user