mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Split user setting stock_decimal_places_prices
into separate settings for input/display (closes #1893)
This commit is contained in:
@@ -82,8 +82,8 @@
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'price',
|
||||
'label' => 'Price',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices']),
|
||||
'decimals' => $userSettings['stock_decimal_places_prices'],
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices_input']),
|
||||
'decimals' => $userSettings['stock_decimal_places_prices_input'],
|
||||
'value' => '',
|
||||
'contextInfoId' => 'price-hint',
|
||||
'hint' => $__t('This will apply to added products'),
|
||||
|
@@ -102,8 +102,8 @@
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'price',
|
||||
'label' => 'Price',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices']),
|
||||
'decimals' => $userSettings['stock_decimal_places_prices'],
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices_input']),
|
||||
'decimals' => $userSettings['stock_decimal_places_prices_input'],
|
||||
'value' => '',
|
||||
'contextInfoId' => 'price-hint',
|
||||
'isRequired' => false,
|
||||
|
@@ -92,8 +92,8 @@
|
||||
'id' => 'price',
|
||||
'value' => $price,
|
||||
'label' => 'Price',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices']),
|
||||
'decimals' => $userSettings['stock_decimal_places_prices'],
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices_input']),
|
||||
'decimals' => $userSettings['stock_decimal_places_prices_input'],
|
||||
'hint' => $__t('Per stock quantity unit'),
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'locale-number-input locale-number-currency'
|
||||
|
@@ -173,10 +173,19 @@
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'stock_decimal_places_prices',
|
||||
'additionalAttributes' => 'data-setting-key="stock_decimal_places_prices"',
|
||||
'label' => 'Decimal places allowed for prices',
|
||||
'id' => 'stock_decimal_places_prices_input',
|
||||
'additionalAttributes' => 'data-setting-key="stock_decimal_places_prices_input"',
|
||||
'label' => 'Decimal places allowed for prices (input)',
|
||||
'min' => 0,
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
))
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'stock_decimal_places_prices_display',
|
||||
'additionalAttributes' => 'data-setting-key="stock_decimal_places_prices_display"',
|
||||
'label' => 'Decimal places allowed for prices (display)',
|
||||
'min' => 0,
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
))
|
||||
@@ -197,6 +206,7 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<a href="{{ $U('/stockoverview') }}"
|
||||
|
Reference in New Issue
Block a user