Allow 4 decimals for all amount inputs (this now closes #998)

This commit is contained in:
Bernd Bestel
2020-10-19 20:25:42 +02:00
parent 80beff2cae
commit 9e982979c3
22 changed files with 67 additions and 66 deletions

View File

@@ -255,8 +255,8 @@
'id' => 'product_amount',
'label' => 'Amount',
'hintId' => 'amount_qu_unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'isRequired' => false,
'value' => $value

View File

@@ -11,8 +11,8 @@
@include('components.numberpicker', array(
'id' => 'display_amount',
'label' => 'Amount',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('This cannot be negative and must be an integral number'),
'additionalGroupCssClasses' => 'col-4 mb-1',

View File

@@ -41,8 +41,8 @@
'id' => '',
'label' => $userfield->caption,
'noNameAttribute' => true,
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'isRequired' => false,
'additionalCssClasses' => 'userfield-input',
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'

View File

@@ -54,8 +54,8 @@
'id' => 'amount',
'label' => 'Amount',
'hintId' => 'amount_qu_unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => 0,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalHtmlContextHelp' => '<div id="tare-weight-handling-info"

View File

@@ -23,7 +23,7 @@
'label' => 'New amount',
'hintId' => 'new_amount_qu_unit',
'min' => 0,
'decimals' => 2,
'decimals' => 4,
'value' => 1,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'additionalAttributes' => 'data-not-equal="-1"',

View File

@@ -55,8 +55,8 @@
@include('components.numberpicker', array(
'id' => 'qu_factor_purchase_to_stock',
'label' => 'Factor purchase to stock quantity unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'isRequired' => true,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),

View File

@@ -142,8 +142,8 @@
@include('components.numberpicker', array(
'id' => 'min_stock_amount',
'label' => 'Minimum stock amount',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'additionalGroupCssClasses' => 'mb-1'
@@ -245,8 +245,8 @@
@include('components.numberpicker', array(
'id' => 'qu_factor_purchase_to_stock',
'label' => 'Factor purchase to stock quantity unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalCssClasses' => 'input-group-qu',
@@ -287,8 +287,8 @@
@include('components.numberpicker', array(
'id' => 'tare_weight',
'label' => 'Tare weight',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %s', '0'),
'additionalAttributes' => $additionalAttributes,
@@ -316,8 +316,8 @@
@include('components.numberpicker', array(
'id' => 'calories',
'label' => 'Energy (kcal)',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'),
'hint' => $__t('Per stock quantity unit'),

View File

@@ -47,8 +47,8 @@
'id' => 'amount',
'label' => 'Amount',
'hintId' => 'amount_qu_unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalHtmlContextHelp' => '<div id="tare-weight-handling-info"
class="text-info font-italic d-none">' . $__t('Tare weight handling enabled - please weigh the whole container, the amount to be posted will be automatically calculcated') . '</div>'
@@ -135,8 +135,8 @@
@include('components.numberpicker', array(
'id' => 'qu_factor_purchase_to_stock',
'label' => 'Factor purchase to stock quantity unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'additionalGroupCssClasses' => 'd-none',
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalCssClasses' => 'input-group-qu',

View File

@@ -81,8 +81,8 @@
@include('components.numberpicker', array(
'id' => 'factor',
'label' => 'Factor',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('This cannot be lower than %1$s and must be a valid number with max. %2$s decimal places', '0', '3'),
'additionalHtmlElements' => '<p id="qu-conversion-info"

View File

@@ -38,8 +38,8 @@
@include('components.numberpicker', array(
'id' => 'amount',
'label' => 'Amount',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'isRequired' => false,
'value' => 1
))

View File

@@ -64,8 +64,8 @@
'id' => 'amount',
'label' => 'Amount',
'hintId' => 'amount_qu_unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => $value,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '0.01')
))

View File

@@ -66,8 +66,8 @@
'id' => 'qu_factor_purchase_to_stock',
'label' => 'Factor purchase to stock quantity unit',
'value' => $stockEntry->qu_factor_purchase_to_stock,
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalCssClasses' => 'input-group-qu',
'additionalHtmlElements' => '<p id="qu-conversion-info"

View File

@@ -71,7 +71,7 @@
'additionalAttributes' => 'data-setting-key="stock_default_purchase_amount"',
'label' => 'Default amount for purchase',
'min' => 0,
'decimals' => 2,
'decimals' => 4,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control'
))
@@ -82,7 +82,7 @@
'additionalAttributes' => 'data-setting-key="stock_default_consume_amount"',
'label' => 'Default amount for consume',
'min' => 0,
'decimals' => 2,
'decimals' => 4,
'invalidFeedback' => $__t('This cannot be lower than %s', '1'),
'additionalCssClasses' => 'user-setting-control'
))

View File

@@ -46,8 +46,8 @@
'id' => 'amount',
'label' => 'Amount',
'hintId' => 'amount_qu_unit',
'min' => 0.01,
'decimals' => 2,
'min' => 0.0001,
'decimals' => 4,
'value' => 1,
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
'additionalHtmlContextHelp' => '<div id="tare-weight-handling-info"