Added the product descrption as a column on the stock overview page (closes #1362)

This commit is contained in:
Bernd Bestel 2021-07-08 20:22:51 +02:00
parent 7595d640f5
commit 8b977644f7
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
4 changed files with 12 additions and 2 deletions

View File

@ -2147,3 +2147,6 @@ msgstr ""
msgid "Show only in-stock products"
msgstr ""
msgid "Product description"
msgstr ""

View File

@ -29,7 +29,8 @@ SELECT
plp.purchased_date AS last_purchased,
plp.price AS last_price,
p.min_stock_amount,
pbcs.barcodes AS product_barcodes
pbcs.barcodes AS product_barcodes,
p.description as product_description
FROM (
SELECT *
FROM stock_current
@ -80,7 +81,8 @@ SELECT
plp.purchased_date AS last_purchased,
plp.price AS last_price,
p.min_stock_amount,
pbcs.barcodes AS product_barcodes
pbcs.barcodes AS product_barcodes,
p.description as product_description
FROM (
SELECT *
FROM stock_current

View File

@ -14,6 +14,7 @@
{ 'visible': false, 'targets': 11 },
{ 'visible': false, 'targets': 12 },
{ 'visible': false, 'targets': 13 },
{ 'visible': false, 'targets': 14 },
{ "type": "num", "targets": 3 },
{ "type": "html-num-fmt", "targets": 9 },
{ "type": "html-num-fmt", "targets": 10 },

View File

@ -169,6 +169,7 @@
<th>{{ $__t('Last purchased') }}</th>
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) d-none @endif">{{ $__t('Last price') }}</th>
<th>{{ $__t('Min. stock amount') }}</th>
<th>{{ $__t('Product description') }}</th>
@include('components.userfields_thead', array(
'userfields' => $userfields
@ -399,6 +400,9 @@
<td>
<span class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->min_stock_amount }}</span>
</td>
<td>
{{ $currentStockEntry->product_description }}
</td>
@include('components.userfields_tbody', array(
'userfields' => $userfields,