mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Test/review/rework (and hopefully finalized) new price handling
This commit is contained in:
@@ -37,14 +37,14 @@
|
||||
data-status-filter="overdue"
|
||||
class="error-message status-filter-message responsive-button"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-2"
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
href="#table-filter-row"
|
||||
role="button">
|
||||
<i class="fas fa-filter"></i>
|
||||
</a>
|
||||
<a id="clear-filter-button"
|
||||
class="btn btn-sm btn-outline-info mt-2"
|
||||
class="btn btn-sm btn-outline-info mt-1"
|
||||
href="#">
|
||||
{{ $__t('Clear filter') }}
|
||||
</a>
|
||||
|
@@ -42,14 +42,14 @@
|
||||
class="normal-message user-filter-message responsive-button"></div>
|
||||
@endif
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-2"
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
href="#table-filter-row"
|
||||
role="button">
|
||||
<i class="fas fa-filter"></i>
|
||||
</a>
|
||||
<a id="clear-filter-button"
|
||||
class="btn btn-sm btn-outline-info mt-2"
|
||||
class="btn btn-sm btn-outline-info mt-1"
|
||||
href="#">
|
||||
{{ $__t('Clear filter') }}
|
||||
</a>
|
||||
|
@@ -15,6 +15,7 @@
|
||||
@php if(empty($additionalHtmlContextHelp)) { $additionalHtmlContextHelp = ''; } @endphp
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
@php if(!isset($noNameAttribute)) { $noNameAttribute = false; } @endphp
|
||||
@php if(empty($contextInfoId)) { $additionalHtmlContextHelp = ''; } @endphp
|
||||
|
||||
<div id="group-{{ $id }}"
|
||||
class="form-group {{ $additionalGroupCssClasses }}">
|
||||
@@ -22,7 +23,12 @@
|
||||
{{ $__t($label) }}
|
||||
<span id="{{ $hintId }}"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $hint }}"></span>{!! $additionalHtmlContextHelp !!}</label>
|
||||
title="{{ $hint }}"></span>{!! $additionalHtmlContextHelp !!}
|
||||
@if(!empty($contextInfoId))
|
||||
<span id="{{ $contextInfoId }}"
|
||||
class="small text-muted"></span>
|
||||
@endif
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<input {!!
|
||||
$additionalAttributes
|
||||
|
@@ -7,6 +7,7 @@
|
||||
@php if(empty($additionalHtmlElements)) { $additionalHtmlElements = ''; } @endphp
|
||||
@php if(empty($label)) { $label = 'Amount'; } @endphp
|
||||
@php if(empty($initialQuId)) { $initialQuId = '-1'; } @endphp
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
|
||||
<div class="form-group row {{ $additionalGroupCssClasses }}">
|
||||
<div class="col">
|
||||
@@ -29,7 +30,9 @@
|
||||
|
||||
<div class="col-sm-7 col-xs-12">
|
||||
<label for="qu_id">{{ $__t('Quantity unit') }}</label>
|
||||
<select required
|
||||
<select @if($isRequired)
|
||||
required
|
||||
@endif
|
||||
class="form-control input-group-productamountpicker"
|
||||
id="qu_id"
|
||||
name="qu_id"
|
||||
|
@@ -42,8 +42,6 @@
|
||||
|
||||
<strong>{{ $__t('Stock amount') }}:</strong> <span id="productcard-product-stock-amount"
|
||||
class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-qu-name"></span>
|
||||
<span id="productcard-product-stock-factor-purchase-amount"
|
||||
class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-factor-purchase-qu-name"></span>
|
||||
<span id="productcard-product-stock-opened-amount"
|
||||
class="small font-italic locale-number locale-number-quantity-amount"></span><br>
|
||||
<strong>{{ $__t('Stock value') }}:</strong> <span id="productcard-product-stock-value"
|
||||
|
@@ -6,9 +6,14 @@
|
||||
@section('title', $__t('Create Barcode'))
|
||||
@endif
|
||||
|
||||
@section('viewJsName', 'productbarcodesform')
|
||||
@section('viewJsName', 'productbarcodeform')
|
||||
|
||||
@section('content')
|
||||
<script>
|
||||
Grocy.QuantityUnits = {!! json_encode($quantityUnits) !!};
|
||||
Grocy.QuantityUnitConversionsResolved = {!! json_encode($quantityUnitConversionsResolved) !!};
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="title-related-links">
|
||||
@@ -27,11 +32,13 @@
|
||||
|
||||
<script>
|
||||
Grocy.EditMode = '{{ $mode }}';
|
||||
Grocy.EditObjectProduct = {!! json_encode($product) !!};
|
||||
</script>
|
||||
|
||||
@if($mode == 'edit')
|
||||
<script>
|
||||
Grocy.EditObjectId = {{ $barcode->id }};
|
||||
Grocy.EditObject = {!! json_encode($barcode) !!};
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@@ -56,21 +63,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php if($mode == 'edit') { $value = $barcode->qu_factor_purchase_to_stock; } else { $value = 1; } @endphp
|
||||
@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'],
|
||||
@php if($mode == 'edit') { $value = $barcode->amount; } else { $value = ''; } @endphp
|
||||
@include('components.productamountpicker', array(
|
||||
'value' => $value,
|
||||
'isRequired' => true,
|
||||
'invalidFeedback' => $__t('The amount cannot be lower than %s', '1'),
|
||||
'additionalCssClasses' => 'input-group-qu',
|
||||
'isRequired' => false
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<div class="form-group">
|
||||
<label for="shopping_location_id_id">{{ $__t('Default store') }}</label>
|
||||
<label for="shopping_location_id_id">{{ $__t('Store') }}</label>
|
||||
<select class="form-control"
|
||||
id="shopping_location_id"
|
||||
name="shopping_location_id">
|
||||
@@ -78,7 +79,7 @@
|
||||
@foreach($shoppinglocations as $store)
|
||||
<option @if($mode=='edit'
|
||||
&&
|
||||
$store->id == $product->shopping_location_id) selected="selected" @endif value="{{ $store->id }}">{{ $store->name }}</option>
|
||||
$store->id == $barcode->shopping_location_id) selected="selected" @endif value="{{ $store->id }}">{{ $store->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
@@ -298,7 +298,7 @@
|
||||
'value' => $value,
|
||||
'invalidFeedback' => $__t('This cannot be lower than %s', '0'),
|
||||
'additionalAttributes' => $additionalAttributes,
|
||||
'hintId' => 'tare_weight_qu_info'
|
||||
'contextInfoId' => 'tare_weight_qu_info'
|
||||
))
|
||||
@php $additionalAttributes = '' @endphp
|
||||
|
||||
@@ -380,82 +380,6 @@
|
||||
|
||||
<div class="col-lg-6 col-xs-12 @if($mode == 'create') d-none @endif">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="title-related-links">
|
||||
<h4>
|
||||
{{ $__t('QU conversions') }}
|
||||
</h4>
|
||||
<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#related-links">
|
||||
<i class="fas fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
|
||||
id="related-links">
|
||||
<a class="btn btn-outline-primary btn-sm m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
|
||||
href="{{ $U('/quantityunitconversion/new?embedded&product=' . $product->id ) }}">
|
||||
{{ $__t('Add') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 id="qu-conversion-headline-info"
|
||||
class="text-muted font-italic"></h5>
|
||||
|
||||
<table id="qu-conversions-table"
|
||||
class="table table-sm table-striped nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border-right"></th>
|
||||
<th>{{ $__t('Factor') }}</th>
|
||||
<th>{{ $__t('Unit') }}</th>
|
||||
<th class="d-none">Hidden group</th>
|
||||
<th class="d-none">Hidden from_qu_id</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="d-none">
|
||||
@if($mode == "edit")
|
||||
@foreach($quConversions as $quConversion)
|
||||
@if($quConversion->product_id == $product->id || $quConversion->product_id == null)
|
||||
<tr>
|
||||
<td class="fit-content border-right">
|
||||
<a class="btn btn-sm btn-info show-as-dialog-link @if($quConversion->product_id == null) disabled @endif"
|
||||
href="{{ $U('/quantityunitconversion/' . $quConversion->id . '?embedded&product=' . $product->id ) }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-danger qu-conversion-delete-button @if($quConversion->product_id == null) disabled @endif"
|
||||
href="#"
|
||||
data-qu-conversion-id="{{ $quConversion->id }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="locale-number locale-number-quantity-amount">{{ $quConversion->factor }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }}
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($quConversion->product_id != null)
|
||||
{{ $__t('Product overrides') }}
|
||||
@else
|
||||
{{ $__t('Default conversions') }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
from_qu_id xx{{ $quConversion->from_qu_id }}xx
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col">
|
||||
<div class="title-related-links">
|
||||
<h4>
|
||||
@@ -485,10 +409,11 @@
|
||||
<tr>
|
||||
<th class="border-right"></th>
|
||||
<th>{{ $__t('Barcode') }}</th>
|
||||
<th>{{ $__t('Factor purchase to stock quantity unit') }}</th>
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<th>{{ $__t('Store') }}</th>
|
||||
@endif
|
||||
<th>{{ $__t('Quantity unit') }}</th>
|
||||
<th>{{ $__t('Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="d-none">
|
||||
@@ -513,9 +438,6 @@
|
||||
<td>
|
||||
{{ $barcode->barcode }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="locale-number locale-number-quantity-amount">{{ $barcode->qu_factor_purchase_to_stock }}</span>
|
||||
</td>
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<td id="barcode-shopping-location">
|
||||
@if (FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id) !== null)
|
||||
@@ -523,6 +445,96 @@
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
<td>
|
||||
@if(!empty($barcode->qu_id))
|
||||
<span class="locale-number locale-number-quantity-amount">{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $barcode->qu_id)->name }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!empty($barcode->amount))
|
||||
{{ $barcode->amount }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col">
|
||||
<div class="title-related-links">
|
||||
<h4>
|
||||
{{ $__t('QU conversions') }}
|
||||
</h4>
|
||||
<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#related-links">
|
||||
<i class="fas fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
|
||||
id="related-links">
|
||||
<a class="btn btn-outline-primary btn-sm m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
|
||||
href="{{ $U('/quantityunitconversion/new?embedded&product=' . $product->id ) }}">
|
||||
{{ $__t('Add') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 id="qu-conversion-headline-info"
|
||||
class="text-muted font-italic"></h5>
|
||||
|
||||
<table id="qu-conversions-table"
|
||||
class="table table-sm table-striped nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border-right"></th>
|
||||
<th>{{ $__t('Quantity unit from') }}</th>
|
||||
<th>{{ $__t('Quantity unit to') }}</th>
|
||||
<th>{{ $__t('Factor') }}</th>
|
||||
<th class="d-none">Hidden group</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="d-none">
|
||||
@if($mode == "edit")
|
||||
@foreach($quConversions as $quConversion)
|
||||
@if($quConversion->product_id == $product->id || $quConversion->product_id == null && ($quConversion->product_id != null || $quConversion->from_qu_id == $product->qu_id_purchase || $quConversion->from_qu_id == $product->qu_id_stock || $quConversion->to_qu_id == $product->qu_id_purchase || $quConversion->to_qu_id == $product->qu_id_stock))
|
||||
<tr>
|
||||
<td class="fit-content border-right">
|
||||
<a class="btn btn-sm btn-info show-as-dialog-link @if($quConversion->product_id == null) disabled @endif"
|
||||
href="{{ $U('/quantityunitconversion/' . $quConversion->id . '?embedded&product=' . $product->id ) }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-danger qu-conversion-delete-button @if($quConversion->product_id == null) disabled @endif"
|
||||
href="#"
|
||||
data-qu-conversion-id="{{ $quConversion->id }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->from_qu_id)->name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="locale-number locale-number-quantity-amount">{{ $quConversion->factor }}</span>
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if($quConversion->product_id != null)
|
||||
{{ $__t('Product overrides') }}
|
||||
@else
|
||||
{{ $__t('Default conversions') }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="font-italic">
|
||||
{{ $__t('This means 1 %1$s is the same as %2$s %3$s', FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->from_qu_id)->name, $quConversion->factor, FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
@@ -94,7 +94,6 @@
|
||||
<th>{{ $__t('Min. stock amount') }}</th>
|
||||
<th>{{ $__t('QU purchase') }}</th>
|
||||
<th>{{ $__t('QU stock') }}</th>
|
||||
<th>{{ $__t('QU factor') }}</th>
|
||||
<th>{{ $__t('Product group') }}</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
@@ -133,9 +132,6 @@
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $product->qu_id_stock)->name }}
|
||||
</td>
|
||||
<td>
|
||||
<span class="locale-number locale-number-quantity-amount">{{ $product->qu_factor_purchase_to_stock }}</span>
|
||||
</td>
|
||||
<td>
|
||||
@if(!empty($product->product_group_id)) {{ FindObjectInArrayByPropertyValue($productGroups, 'id', $product->product_group_id)->name }} @endif
|
||||
</td>
|
||||
|
@@ -103,7 +103,7 @@
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_prices'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_prices'],
|
||||
'value' => '',
|
||||
'hintId' => 'price-hint',
|
||||
'contextInfoId' => 'price-hint',
|
||||
'invalidFeedback' => $__t('The price cannot be lower than %s', '0'),
|
||||
'isRequired' => false,
|
||||
'additionalGroupCssClasses' => 'mb-1'
|
||||
@@ -117,7 +117,7 @@
|
||||
value="unit-price"
|
||||
checked>
|
||||
<label class="form-check-label"
|
||||
for="price-type-unit-price">{{ $__t('Price') }}</label>
|
||||
for="price-type-unit-price">{{ $__t('Unit price') }}</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline mb-3">
|
||||
<input class="form-check-input"
|
||||
|
@@ -51,7 +51,6 @@
|
||||
<div class="form-group">
|
||||
<label for="from_qu_id">{{ $__t('Quantity unit from') }}</label>
|
||||
<select required
|
||||
disabled
|
||||
class="form-control input-group-qu"
|
||||
id="from_qu_id"
|
||||
name="from_qu_id">
|
||||
@@ -89,7 +88,7 @@
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1',
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'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'),
|
||||
'invalidFeedback' => $__t('This cannot be lower than %1$s and must be a valid number with max. %2$s decimal places', '0', $userSettings['stock_decimal_places_amounts']),
|
||||
'additionalHtmlElements' => '<p id="qu-conversion-info"
|
||||
class="form-text text-info d-none"></p>',
|
||||
'additionalCssClasses' => 'input-group-qu'
|
||||
@@ -100,11 +99,7 @@
|
||||
<input type="hidden"
|
||||
name="create_inverse:skip"
|
||||
value="0">
|
||||
<input @if($mode=='create'
|
||||
&&
|
||||
$product==null)
|
||||
checked
|
||||
@endif
|
||||
<input checked
|
||||
class="form-check-input custom-control-input"
|
||||
type="checkbox"
|
||||
id="create_inverse"
|
||||
@@ -112,9 +107,9 @@
|
||||
value="1">
|
||||
<label class="form-check-label custom-control-label"
|
||||
for="create_inverse">{{ $__t('Create inverse QU conversion') }}</label>
|
||||
<span id="qu-conversion-inverse-info"
|
||||
class="form-text text-info d-none"></span>
|
||||
</div>
|
||||
<span id="qu-conversion-inverse-info"
|
||||
class="form-text text-info d-none"></span>
|
||||
</div>
|
||||
|
||||
@include('components.userfieldsform', array(
|
||||
|
@@ -77,7 +77,7 @@
|
||||
</div>
|
||||
@else
|
||||
<div class="float-right">
|
||||
<button class="btn btn-outline-dark d-md-none mt-2 order-1 order-md-3"
|
||||
<button class="btn btn-outline-dark d-md-none mt-1 order-1 order-md-3"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#table-filter-row">
|
||||
@@ -95,7 +95,7 @@
|
||||
data-status-filter="belowminstockamount"
|
||||
class="collapse d-md-inline-block normal-message status-filter-message responsive-button @if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif"><span class="d-block d-md-none">{{count($missingProducts)}} <i class="fas fa-exclamation-circle"></i></span><span class="d-none d-md-block">{{ $__n(count($missingProducts), '%s product is below defined min. stock amount', '%s products are below defined min. stock amount') }}</span></div>
|
||||
<div id="related-links"
|
||||
class="float-right mt-2 collapse d-md-block">
|
||||
class="float-right mt-1 collapse d-md-block">
|
||||
<a class="btn btn-primary responsive-button btn-sm mb-1 show-as-dialog-link"
|
||||
href="{{ $U('/shoppinglistitem/new?embedded&list=' . $selectedShoppingListId) }}">
|
||||
{{ $__t('Add item') }}
|
||||
|
@@ -48,7 +48,6 @@
|
||||
<th>{{ $__t('Store') }}</th>
|
||||
<th>{{ $__t('Price') }}</th>
|
||||
@endif
|
||||
<th>{{ $__t('Factor purchase to stock quantity unit') }}</th>
|
||||
<th>{{ $__t('Purchased date') }}</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
@@ -214,9 +213,6 @@
|
||||
{{ $stockEntry->price }}
|
||||
</td>
|
||||
@endif
|
||||
<td id="stock-{{ $stockEntry->id }}-qu-factor-purchase-to-stock">
|
||||
{{ $stockEntry->qu_factor_purchase_to_stock }}
|
||||
</td>
|
||||
<td>
|
||||
<span id="stock-{{ $stockEntry->id }}-purchased-date">{{ $stockEntry->purchased_date }}</span>
|
||||
<time id="stock-{{ $stockEntry->id }}-purchased-date-timeago"
|
||||
|
@@ -64,18 +64,6 @@
|
||||
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>'
|
||||
))
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'qu_factor_purchase_to_stock',
|
||||
'label' => 'Factor purchase to stock quantity unit',
|
||||
'value' => $stockEntry->qu_factor_purchase_to_stock,
|
||||
'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'),
|
||||
'additionalCssClasses' => 'input-group-qu',
|
||||
'additionalHtmlElements' => '<p id="qu-conversion-info"
|
||||
class="form-text text-muted small d-none"></p>'
|
||||
))
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
@php
|
||||
if (empty($stockEntry->price))
|
||||
@@ -134,10 +122,15 @@
|
||||
'additionalGroupCssClasses' => 'date-only-datetimepicker'
|
||||
))
|
||||
|
||||
<div class="checkbox">
|
||||
<label for="open">
|
||||
<input @if($stockEntry->open == 1) checked @endif type="checkbox" id="open" name="open"> {{ $__t('Opened') }}
|
||||
</label>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="hidden"
|
||||
name="open"
|
||||
value="1">
|
||||
<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>
|
||||
|
||||
<button id="save-stockentry-button"
|
||||
|
@@ -62,14 +62,14 @@
|
||||
data-status-filter="belowminstockamount"
|
||||
class="normal-message status-filter-message responsive-button"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-2"
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
href="#table-filter-row"
|
||||
role="button">
|
||||
<i class="fas fa-filter"></i>
|
||||
</a>
|
||||
<a id="clear-filter-button"
|
||||
class="btn btn-sm btn-outline-info mt-2"
|
||||
class="btn btn-sm btn-outline-info mt-1"
|
||||
href="#">
|
||||
{{ $__t('Clear filter') }}
|
||||
</a>
|
||||
@@ -308,10 +308,6 @@
|
||||
class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->amount }}</span> <span id="product-{{ $currentStockEntry->product_id }}-qu-name">{{ $__n($currentStockEntry->amount, $currentStockEntry->qu_unit_name, $currentStockEntry->qu_unit_name_plural) }}</span>
|
||||
<span id="product-{{ $currentStockEntry->product_id }}-opened-amount"
|
||||
class="small font-italic">@if($currentStockEntry->amount_opened > 0){{ $__t('%s opened', $currentStockEntry->amount_opened) }}@endif</span>
|
||||
@if($currentStockEntry->amount != $currentStockEntry->factor_purchase_amount)
|
||||
<span id="product-{{ $currentStockEntry->product_id }}-factor-purchase-amount"
|
||||
class="locale-number locale-number-quantity-amount">({{ $currentStockEntry->factor_purchase_amount }}</span> <span id="product-{{ $currentStockEntry->product_id }}-qu-purchase-name">{{ $__n($currentStockEntry->factor_purchase_amount, $currentStockEntry->qu_purchase_unit_name,$currentStockEntry->qu_purchase_unit_name_plural) }})</span>
|
||||
@endif
|
||||
@if($currentStockEntry->is_aggregated_amount == 1)
|
||||
<span class="pl-1 text-secondary">
|
||||
<i class="fas fa-custom-sigma-sign"></i> <span id="product-{{ $currentStockEntry->product_id }}-amount-aggregated"
|
||||
|
@@ -44,14 +44,14 @@
|
||||
data-status-filter="overdue"
|
||||
class="error-message status-filter-message responsive-button"></div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-2"
|
||||
<a class="btn btn-sm btn-outline-info d-md-none mt-1"
|
||||
data-toggle="collapse"
|
||||
href="#table-filter-row"
|
||||
role="button">
|
||||
<i class="fas fa-filter"></i>
|
||||
</a>
|
||||
<a id="clear-filter-button"
|
||||
class="btn btn-sm btn-outline-info mt-2"
|
||||
class="btn btn-sm btn-outline-info mt-1"
|
||||
href="#">
|
||||
{{ $__t('Clear filter') }}
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user