mirror of
https://github.com/grocy/grocy.git
synced 2026-03-27 23:29:25 +01:00
Fixes blank/missing items in spending report
Use left (outer) join when connecting product to optional product group
This commit is contained in:
parent
99f448dd64
commit
4b668a00ec
|
|
@ -44,7 +44,7 @@ class StockReportsController extends BaseController
|
|||
FROM products_price_history pph
|
||||
JOIN products p
|
||||
ON pph.product_id = p.id
|
||||
JOIN product_groups pg
|
||||
LEFT JOIN product_groups pg
|
||||
ON p.product_group_id = pg.id
|
||||
WHERE $where
|
||||
GROUP BY p.id, p.name, pg.id, pg.name
|
||||
|
|
@ -61,7 +61,7 @@ class StockReportsController extends BaseController
|
|||
FROM products_price_history pph
|
||||
JOIN products p
|
||||
ON pph.product_id = p.id
|
||||
JOIN product_groups pg
|
||||
LEFT JOIN product_groups pg
|
||||
ON p.product_group_id = pg.id
|
||||
WHERE $where
|
||||
GROUP BY pg.id, pg.name
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user