mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Added total calories as a column to stock overview (references #1058)
This commit is contained in:
@@ -20,7 +20,9 @@ SELECT
|
||||
sc.is_aggregated_amount,
|
||||
sc.amount_opened_aggregated,
|
||||
sc.amount_aggregated,
|
||||
p.calories
|
||||
p.calories AS product_calories,
|
||||
sc.amount * p.calories AS calories,
|
||||
sc.amount_aggregated * p.calories AS calories_aggregated
|
||||
FROM (
|
||||
SELECT *
|
||||
FROM stock_current
|
||||
@@ -55,7 +57,9 @@ SELECT
|
||||
sc.is_aggregated_amount,
|
||||
sc.amount_opened_aggregated,
|
||||
sc.amount_aggregated,
|
||||
p.calories
|
||||
p.calories AS product_calories,
|
||||
sc.amount * p.calories AS calories,
|
||||
sc.amount_aggregated * p.calories AS calories_aggregated
|
||||
FROM (
|
||||
SELECT *
|
||||
FROM stock_current
|
||||
|
Reference in New Issue
Block a user