mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Fixed /stockentries group by purchased_date (fixes #1419)
This commit is contained in:
parent
b8e15b990b
commit
69f8c237ff
@ -965,6 +965,12 @@ $(".change-table-columns-visibility-button").on("click", function(e)
|
||||
return;
|
||||
}
|
||||
|
||||
var shadowColumnIndex = $(this.header()).attr("data-shodow-rowgroup-column");
|
||||
if (shadowColumnIndex)
|
||||
{
|
||||
index = shadowColumnIndex;
|
||||
}
|
||||
|
||||
var checked = "checked";
|
||||
if (!visible)
|
||||
{
|
||||
|
@ -62,18 +62,15 @@
|
||||
data-table-selector="#stockentries-table"
|
||||
href="#"><i class="fas fa-eye"></i></a>
|
||||
</th>
|
||||
<th class="d-none">product_id</th> <!-- This must be in the first column for searching -->
|
||||
<th class="d-none">Hidden product_id</th> <!-- This must be in the first column for searching -->
|
||||
<th>{{ $__t('Product') }}</th>
|
||||
<th>{{ $__t('Amount') }}</th>
|
||||
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
<th>{{ $__t('Due date') }}</th>
|
||||
@endif
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)<th>{{ $__t('Location') }}</th>@endif
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<th>{{ $__t('Store') }}</th>
|
||||
<th>{{ $__t('Price') }}</th>
|
||||
@endif
|
||||
<th>{{ $__t('Purchased date') }}</th>
|
||||
<th class="@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING) d-none @endif">{{ $__t('Due date') }}</th>
|
||||
<th class="@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif">{{ $__t('Location') }}</th>
|
||||
<th class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Store') }}</th>
|
||||
<th class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Price') }}</th>
|
||||
<th data-shodow-rowgroup-column="9">{{ $__t('Purchased date') }}</th>
|
||||
<th class="d-none">Hidden purchased_date</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
'userfields' => $userfields
|
||||
@ -237,39 +234,37 @@
|
||||
<span id="stock-{{ $stockEntry->id }}-opened-amount"
|
||||
class="small font-italic">@if($stockEntry->open == 1){{ $__t('Opened') }}@endif</span>
|
||||
</td>
|
||||
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
<td>
|
||||
<td class="@if(GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING) d-none @endif">
|
||||
<span id="stock-{{ $stockEntry->id }}-due-date">{{ $stockEntry->best_before_date }}</span>
|
||||
<time id="stock-{{ $stockEntry->id }}-due-date-timeago"
|
||||
class="timeago timeago-contextual"
|
||||
datetime="{{ $stockEntry->best_before_date }} 23:59:59"></time>
|
||||
</td>
|
||||
@endif
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)
|
||||
<td id="stock-{{ $stockEntry->id }}-location"
|
||||
class="@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif"
|
||||
data-location-id="{{ $stockEntry->location_id }}">
|
||||
{{ FindObjectInArrayByPropertyValue($locations, 'id', $stockEntry->location_id)->name }}
|
||||
</td>
|
||||
@endif
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<td id="stock-{{ $stockEntry->id }}-shopping-location"
|
||||
class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif"
|
||||
data-shopping-location-id="{{ $stockEntry->shopping_location_id }}">
|
||||
@if (FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $stockEntry->shopping_location_id) !== null)
|
||||
{{ FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $stockEntry->shopping_location_id)->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td id="stock-{{ $stockEntry->id }}-price"
|
||||
class="@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif"
|
||||
class="locale-number locale-number-currency"
|
||||
data-price-id="{{ $stockEntry->price }}">
|
||||
{{ $stockEntry->price }}
|
||||
</td>
|
||||
@endif
|
||||
<td>
|
||||
<span id="stock-{{ $stockEntry->id }}-purchased-date">{{ $stockEntry->purchased_date }}</span>
|
||||
<time id="stock-{{ $stockEntry->id }}-purchased-date-timeago"
|
||||
class="timeago timeago-contextual"
|
||||
datetime="{{ $stockEntry->purchased_date }} 23:59:59"></time>
|
||||
</td>
|
||||
<td class="d-none">{{ $stockEntry->purchased_date }}</td>
|
||||
|
||||
@include('components.userfields_tbody', array(
|
||||
'userfields' => $userfields,
|
||||
|
Loading…
x
Reference in New Issue
Block a user