mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Split the quick consume and open amount product option (closes #2127)
This commit is contained in:
@@ -495,10 +495,22 @@
|
||||
'min' => $DEFAULT_MIN_AMOUNT,
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'value' => $value,
|
||||
'hint' => $__t('This amount is used for the "quick consume/open buttons" on the stock overview page (related to quantity unit stock)'),
|
||||
'hint' => $__t('This amount is used for the "quick consume button" on the stock overview page (related to quantity unit stock)'),
|
||||
'contextInfoId' => 'quick_consume_qu_info',
|
||||
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
|
||||
))
|
||||
|
||||
@php if($mode == 'edit') { $value = $product->quick_open_amount; } else { $value = 1; } @endphp
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'quick_open_amount',
|
||||
'label' => 'Quick open amount',
|
||||
'min' => $DEFAULT_MIN_AMOUNT,
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'value' => $value,
|
||||
'hint' => $__t('This amount is used for the "quick open button" on the stock overview page (related to quantity unit stock)'),
|
||||
'contextInfoId' => 'quick_open_qu_info',
|
||||
'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount'
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||
<div class="form-group">
|
||||
|
@@ -213,16 +213,16 @@
|
||||
<i class="fa-solid fa-utensils"></i> {{ $__t('All') }}
|
||||
</a>
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING)
|
||||
<a class="btn btn-success btn-sm product-open-button @if($currentStockEntry->amount_aggregated < $currentStockEntry->quick_consume_amount || $currentStockEntry->amount_aggregated == $currentStockEntry->amount_opened_aggregated || $currentStockEntry->enable_tare_weight_handling == 1) disabled @endif"
|
||||
<a class="btn btn-success btn-sm product-open-button @if($currentStockEntry->amount_aggregated < $currentStockEntry->quick_open_amount || $currentStockEntry->amount_aggregated == $currentStockEntry->amount_opened_aggregated || $currentStockEntry->enable_tare_weight_handling == 1) disabled @endif"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
data-placement="left"
|
||||
title="{{ $__t('Mark %1$s of %2$s as open', floatval($currentStockEntry->quick_consume_amount_qu_consume) . ' ' . $currentStockEntry->qu_consume_name, $currentStockEntry->product_name) }}"
|
||||
title="{{ $__t('Mark %1$s of %2$s as open', floatval($currentStockEntry->quick_open_amount_qu_consume) . ' ' . $currentStockEntry->qu_consume_name, $currentStockEntry->product_name) }}"
|
||||
data-product-id="{{ $currentStockEntry->product_id }}"
|
||||
data-product-name="{{ $currentStockEntry->product_name }}"
|
||||
data-product-qu-name="{{ $currentStockEntry->qu_stock_name }}"
|
||||
data-open-amount="{{ $currentStockEntry->quick_consume_amount }}">
|
||||
<i class="fa-solid fa-box-open"></i> <span class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->quick_consume_amount_qu_consume }}</span>
|
||||
data-open-amount="{{ $currentStockEntry->quick_open_amount }}">
|
||||
<i class="fa-solid fa-box-open"></i> <span class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->quick_open_amount_qu_consume }}</span>
|
||||
</a>
|
||||
@endif
|
||||
<div class="dropdown d-inline-block">
|
||||
|
Reference in New Issue
Block a user