mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Unified purchase / stock entry form field order
This commit is contained in:
@@ -27,6 +27,29 @@
|
|||||||
$product = FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id);
|
$product = FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id);
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
|
@include('components.numberpicker', array(
|
||||||
|
'id' => 'amount',
|
||||||
|
'value' => $stockEntry->amount,
|
||||||
|
'min' => $DEFAULT_MIN_AMOUNT,
|
||||||
|
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||||
|
'label' => 'Amount',
|
||||||
|
'contextInfoId' => 'amount_qu_unit',
|
||||||
|
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
|
||||||
|
))
|
||||||
|
|
||||||
|
@include('components.datetimepicker2', array(
|
||||||
|
'id' => 'purchase_date',
|
||||||
|
'initialValue' => $stockEntry->purchased_date,
|
||||||
|
'label' => 'Purchased date',
|
||||||
|
'format' => 'YYYY-MM-DD',
|
||||||
|
'initWithNow' => false,
|
||||||
|
'limitEndToNow' => false,
|
||||||
|
'limitStartToNow' => false,
|
||||||
|
'invalidFeedback' => $__t('A purchased date is required'),
|
||||||
|
'nextInputSelector' => '#save-stockentry-button',
|
||||||
|
'additionalGroupCssClasses' => 'date-only-datetimepicker'
|
||||||
|
))
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$additionalGroupCssClasses = '';
|
$additionalGroupCssClasses = '';
|
||||||
if (!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
if (!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||||
@@ -54,16 +77,6 @@
|
|||||||
))
|
))
|
||||||
@php $additionalGroupCssClasses = ''; @endphp
|
@php $additionalGroupCssClasses = ''; @endphp
|
||||||
|
|
||||||
@include('components.numberpicker', array(
|
|
||||||
'id' => 'amount',
|
|
||||||
'value' => $stockEntry->amount,
|
|
||||||
'min' => $DEFAULT_MIN_AMOUNT,
|
|
||||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
|
||||||
'label' => 'Amount',
|
|
||||||
'contextInfoId' => 'amount_qu_unit',
|
|
||||||
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
|
|
||||||
))
|
|
||||||
|
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
@php
|
@php
|
||||||
if (empty($stockEntry->price))
|
if (empty($stockEntry->price))
|
||||||
@@ -109,27 +122,6 @@
|
|||||||
value="1">
|
value="1">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@include('components.datetimepicker2', array(
|
|
||||||
'id' => 'purchase_date',
|
|
||||||
'initialValue' => $stockEntry->purchased_date,
|
|
||||||
'label' => 'Purchased date',
|
|
||||||
'format' => 'YYYY-MM-DD',
|
|
||||||
'initWithNow' => false,
|
|
||||||
'limitEndToNow' => false,
|
|
||||||
'limitStartToNow' => false,
|
|
||||||
'invalidFeedback' => $__t('A purchased date is required'),
|
|
||||||
'nextInputSelector' => '#save-stockentry-button',
|
|
||||||
'additionalGroupCssClasses' => 'date-only-datetimepicker'
|
|
||||||
))
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="custom-control custom-checkbox">
|
|
||||||
<input @if($stockEntry->open == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="open" name="open" value="1">
|
|
||||||
<label class="form-check-label custom-control-label"
|
|
||||||
for="open">{{ $__t('Opened') }}</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="note">{{ $__t('Note') }}</label>
|
<label for="note">{{ $__t('Note') }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -141,6 +133,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input @if($stockEntry->open == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="open" name="open" value="1">
|
||||||
|
<label class="form-check-label custom-control-label"
|
||||||
|
for="open">{{ $__t('Opened') }}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@include('components.userfieldsform', array(
|
@include('components.userfieldsform', array(
|
||||||
'userfields' => $userfields,
|
'userfields' => $userfields,
|
||||||
'entity' => 'stock'
|
'entity' => 'stock'
|
||||||
|
Reference in New Issue
Block a user