mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Fixed that best before dates were displayed on the stock overview and stock entries page even with disabled GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING
(fixes #673)
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
- Fixed a PHP notice on the recipes page when there are no recipes (thanks @mrunkel)
|
- Fixed a PHP notice on the recipes page when there are no recipes (thanks @mrunkel)
|
||||||
- Fixed the conversion factor hint to display also decimal places on the purchase page (only displayed when the product has a different purchase/stock quantity unit)
|
- Fixed the conversion factor hint to display also decimal places on the purchase page (only displayed when the product has a different purchase/stock quantity unit)
|
||||||
- Fixed that the stock entries page was broken when there were product userfields defined with enabled "Show as column in tables"
|
- Fixed that the stock entries page was broken when there were product userfields defined with enabled "Show as column in tables"
|
||||||
|
- Fixed that best before dates were displayed on the stock overview and stock entries page even with disabled `GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING`
|
||||||
|
|
||||||
### Calendar fixes
|
### Calendar fixes
|
||||||
- Fixed that the "Share/Integrate calendar (iCal)" button did not work (thanks @tsia)
|
- Fixed that the "Share/Integrate calendar (iCal)" button did not work (thanks @tsia)
|
||||||
|
@@ -33,7 +33,9 @@
|
|||||||
<th class="d-none">product_id</th> <!-- This must be in the first column for searching -->
|
<th class="d-none">product_id</th> <!-- This must be in the first column for searching -->
|
||||||
<th>{{ $__t('Product') }}</th>
|
<th>{{ $__t('Product') }}</th>
|
||||||
<th>{{ $__t('Amount') }}</th>
|
<th>{{ $__t('Amount') }}</th>
|
||||||
|
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||||
<th>{{ $__t('Best before date') }}</th>
|
<th>{{ $__t('Best before date') }}</th>
|
||||||
|
@endif
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)<th>{{ $__t('Location') }}</th>@endif
|
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)<th>{{ $__t('Location') }}</th>@endif
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
<th>{{ $__t('Store') }}</th>
|
<th>{{ $__t('Store') }}</th>
|
||||||
@@ -135,10 +137,12 @@
|
|||||||
<span id="stock-{{ $stockEntry->id }}-amount" class="locale-number locale-number-quantity-amount">{{ $stockEntry->amount }}</span> <span id="product-{{ $stockEntry->product_id }}-qu-name">{{ $__n($stockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name_plural) }}</span>
|
<span id="stock-{{ $stockEntry->id }}-amount" class="locale-number locale-number-quantity-amount">{{ $stockEntry->amount }}</span> <span id="product-{{ $stockEntry->product_id }}-qu-name">{{ $__n($stockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $stockEntry->product_id)->qu_id_stock)->name_plural) }}</span>
|
||||||
<span id="stock-{{ $stockEntry->id }}-opened-amount" class="small font-italic">@if($stockEntry->open == 1){{ $__t('Opened') }}@endif</span>
|
<span id="stock-{{ $stockEntry->id }}-opened-amount" class="small font-italic">@if($stockEntry->open == 1){{ $__t('Opened') }}@endif</span>
|
||||||
</td>
|
</td>
|
||||||
|
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||||
<td>
|
<td>
|
||||||
<span id="stock-{{ $stockEntry->id }}-best-before-date">{{ $stockEntry->best_before_date }}</span>
|
<span id="stock-{{ $stockEntry->id }}-best-before-date">{{ $stockEntry->best_before_date }}</span>
|
||||||
<time id="stock-{{ $stockEntry->id }}-best-before-date-timeago" class="timeago timeago-contextual" datetime="{{ $stockEntry->best_before_date }} 23:59:59"></time>
|
<time id="stock-{{ $stockEntry->id }}-best-before-date-timeago" class="timeago timeago-contextual" datetime="{{ $stockEntry->best_before_date }} 23:59:59"></time>
|
||||||
</td>
|
</td>
|
||||||
|
@endif
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
|
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
|
||||||
<td id="stock-{{ $stockEntry->id }}-location" data-location-id="{{ $stockEntry->location_id }}">
|
<td id="stock-{{ $stockEntry->id }}-location" data-location-id="{{ $stockEntry->location_id }}">
|
||||||
{{ FindObjectInArrayByPropertyValue($locations, 'id', $stockEntry->location_id)->name }}
|
{{ FindObjectInArrayByPropertyValue($locations, 'id', $stockEntry->location_id)->name }}
|
||||||
|
@@ -83,7 +83,9 @@
|
|||||||
<th class="border-right"></th>
|
<th class="border-right"></th>
|
||||||
<th>{{ $__t('Product') }}</th>
|
<th>{{ $__t('Product') }}</th>
|
||||||
<th>{{ $__t('Amount') }}</th>
|
<th>{{ $__t('Amount') }}</th>
|
||||||
|
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||||
<th>{{ $__t('Next best before date') }}</th>
|
<th>{{ $__t('Next best before date') }}</th>
|
||||||
|
@endif
|
||||||
<th class="d-none">Hidden location</th>
|
<th class="d-none">Hidden location</th>
|
||||||
<th class="d-none">Hidden status</th>
|
<th class="d-none">Hidden status</th>
|
||||||
<th class="d-none">Hidden product group</th>
|
<th class="d-none">Hidden product group</th>
|
||||||
@@ -193,10 +195,12 @@
|
|||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
|
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||||
<td>
|
<td>
|
||||||
<span id="product-{{ $currentStockEntry->product_id }}-next-best-before-date">{{ $currentStockEntry->best_before_date }}</span>
|
<span id="product-{{ $currentStockEntry->product_id }}-next-best-before-date">{{ $currentStockEntry->best_before_date }}</span>
|
||||||
<time id="product-{{ $currentStockEntry->product_id }}-next-best-before-date-timeago" class="timeago timeago-contextual" datetime="{{ $currentStockEntry->best_before_date }} 23:59:59"></time>
|
<time id="product-{{ $currentStockEntry->product_id }}-next-best-before-date-timeago" class="timeago timeago-contextual" datetime="{{ $currentStockEntry->best_before_date }} 23:59:59"></time>
|
||||||
</td>
|
</td>
|
||||||
|
@endif
|
||||||
<td class="d-none">
|
<td class="d-none">
|
||||||
@foreach(FindAllObjectsInArrayByPropertyValue($currentStockLocations, 'product_id', $currentStockEntry->product_id) as $locationsForProduct)
|
@foreach(FindAllObjectsInArrayByPropertyValue($currentStockLocations, 'product_id', $currentStockEntry->product_id) as $locationsForProduct)
|
||||||
{{ FindObjectInArrayByPropertyValue($locations, 'id', $locationsForProduct->location_id)->name }}
|
{{ FindObjectInArrayByPropertyValue($locations, 'id', $locationsForProduct->location_id)->name }}
|
||||||
|
Reference in New Issue
Block a user