mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Add purchased date to inventory (#1102)
* Add purchased date to inventory * Clarify stock settings label Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'new_amount',
|
||||
'label' => 'New amount',
|
||||
'label' => 'New stock amount',
|
||||
'hintId' => 'new_amount_qu_unit',
|
||||
'min' => 0,
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
@@ -33,6 +33,23 @@
|
||||
class="text-small 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>'
|
||||
))
|
||||
|
||||
@if(boolval($userSettings['show_purchased_date_on_purchase']))
|
||||
@include('components.datetimepicker2', array(
|
||||
'id' => 'purchased_date',
|
||||
'label' => 'Purchased date',
|
||||
'format' => 'YYYY-MM-DD',
|
||||
'hint' => 'This will apply to added products',
|
||||
'initWithNow' => true,
|
||||
'limitEndToNow' => false,
|
||||
'limitStartToNow' => false,
|
||||
'invalidFeedback' => $__t('A purchased date is required'),
|
||||
'nextInputSelector' => '#best_before_date',
|
||||
'additionalCssClasses' => 'date-only-datetimepicker2',
|
||||
'additionalGroupCssClasses' => $additionalGroupCssClasses,
|
||||
'activateNumberPad' => GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD
|
||||
))
|
||||
@endif
|
||||
|
||||
@php
|
||||
$additionalGroupCssClasses = '';
|
||||
if (!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
@@ -63,7 +80,7 @@
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'price',
|
||||
'label' => 'Price',
|
||||
'label' => 'Price per stock unit',
|
||||
'min' => 0,
|
||||
'decimals' => $userSettings['stock_decimal_places_prices'],
|
||||
'value' => '',
|
||||
|
@@ -123,7 +123,7 @@
|
||||
<input type="checkbox"
|
||||
class="user-setting-control"
|
||||
id="show_purchased_date_on_purchase"
|
||||
data-setting-key="show_purchased_date_on_purchase"> {{ $__t('Show purchased date on purchase form (otherwise the purchased date defaults to today)') }}
|
||||
data-setting-key="show_purchased_date_on_purchase"> {{ $__t('Show purchased date on purchase and inventory page (otherwise the purchased date defaults to today)') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user