mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Use producamountpicker "everywhere" (closes #1015)
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<script>
|
||||
Grocy.QuantityUnits = {!! json_encode($quantityUnits) !!};
|
||||
Grocy.QuantityUnitConversionsResolved = {!! json_encode($quantityUnitConversionsResolved) !!};
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 col-xl-4">
|
||||
<div class="title-related-links">
|
||||
@@ -48,16 +53,11 @@
|
||||
@include('components.productpicker', array(
|
||||
'products' => $products,
|
||||
'barcodes' => $barcodes,
|
||||
'nextInputSelector' => '#amount'
|
||||
'nextInputSelector' => '#display_amount'
|
||||
))
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'amount',
|
||||
'label' => 'Amount',
|
||||
'hintId' => 'amount_qu_unit',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
|
||||
@include('components.productamountpicker', array(
|
||||
'value' => 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>'
|
||||
))
|
||||
@@ -139,18 +139,6 @@
|
||||
value="0">
|
||||
@endif
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'qu_factor_purchase_to_stock',
|
||||
'label' => 'Factor purchase to stock quantity unit',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'additionalGroupCssClasses' => 'd-none',
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
|
||||
'additionalCssClasses' => 'input-group-qu',
|
||||
'additionalHtmlElements' => '<p id="qu-conversion-info"
|
||||
class="form-text text-muted small d-none"></p>'
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
|
||||
@include('components.locationpicker', array(
|
||||
'locations' => $locations,
|
||||
|
Reference in New Issue
Block a user