mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Added Default store as a column to the shopping list (closes #957)
This commit is contained in:
parent
268b8e87d7
commit
76e4a1578c
@ -147,9 +147,9 @@
|
||||
- All tables are now customizable (new little eye icon on the top left corner on each table)
|
||||
- Table columns be shown/hidden
|
||||
- There are also new columns on some pages, hidden by default
|
||||
- Stock overview: Value, product group, calories, last purchased, last price, min. stock amount
|
||||
- Stock overview: Value, Product group, Calories, Last purchased, Last price, Min. stock amount
|
||||
- Products list: Default store
|
||||
- Shopping list: Last price (Unit), Last price (Total)
|
||||
- Shopping list: Last price (Unit), Last price (Total), Default store
|
||||
- Row grouping can be customized to use any available column (thanks @edenhaus)
|
||||
- Table states (visible columns, sorting, column order and so on) are now saved server side (in user settings) means that this stays the same when using different browsers
|
||||
- Dialogs are now used everywhere where appropriate instead of jumping between pages (for example when adding/editing shopping list items)
|
||||
|
@ -7,7 +7,8 @@ SELECT
|
||||
sl.*,
|
||||
p.name AS product_name,
|
||||
plp.price * IFNULL(qucr.factor, 1.0) AS last_price_unit,
|
||||
plp.price * IFNULL(qucr.factor, 1.0) * sl.amount AS last_price_total
|
||||
plp.price * IFNULL(qucr.factor, 1.0) * sl.amount AS last_price_total,
|
||||
st.name AS default_shopping_location_name
|
||||
FROM shopping_list sl
|
||||
LEFT JOIN products p
|
||||
ON sl.product_id = p.id
|
||||
@ -16,4 +17,6 @@ LEFT JOIN quantity_unit_conversions_resolved qucr
|
||||
AND p.qu_id_stock = qucr.from_qu_id
|
||||
AND sl.qu_id = qucr.to_qu_id
|
||||
LEFT JOIN products_last_purchased plp
|
||||
ON sl.product_id = plp.product_id;
|
||||
ON sl.product_id = plp.product_id
|
||||
LEFT JOIN shopping_locations st
|
||||
ON p.shopping_location_id = st.id;
|
||||
|
@ -7,6 +7,7 @@
|
||||
{ 'visible': false, 'targets': 3 },
|
||||
{ 'visible': false, 'targets': 5 },
|
||||
{ 'visible': false, 'targets': 6 },
|
||||
{ 'visible': false, 'targets': 7 },
|
||||
{ "type": "num", "targets": 2 },
|
||||
{ "type": "html-num-fmt", "targets": 5 },
|
||||
{ "type": "html-num-fmt", "targets": 6 }
|
||||
|
@ -164,6 +164,7 @@
|
||||
<th class="d-none">Hidden status</th>
|
||||
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price (Unit)') }}</th>
|
||||
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price (Total)') }}</th>
|
||||
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Default store') }}</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
'userfields' => $userfields
|
||||
@ -243,6 +244,9 @@
|
||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
||||
<span class="locale-number locale-number-currency">{{ $listItem->last_price_total }}</span>
|
||||
</td>
|
||||
<td class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">
|
||||
{{ $listItem->default_shopping_location_name }}
|
||||
</td>
|
||||
|
||||
@include('components.userfields_tbody', array(
|
||||
'userfields' => $userfields,
|
||||
|
Loading…
x
Reference in New Issue
Block a user