Commit 88c610f3 authored by Jérome Perrin's avatar Jérome Perrin

CUSTOM: core: include mirror_total_price in InventoryListBrain

TODO: discuss wether this can be an useful addition
parent 8ab949e9
......@@ -10,7 +10,8 @@ SELECT
<dtml-if transformed_uid> * transformation.quantity</dtml-if>, <dtml-var precision>))
AS converted_quantity,
</dtml-if>
IFNULL(SUM(ROUND(<dtml-var stock_table_id>.total_price, <dtml-var precision>)), 0) AS total_price
IFNULL(SUM(ROUND(<dtml-var stock_table_id>.total_price, <dtml-var precision>)), 0) AS total_price,
IFNULL(SUM(ROUND(<dtml-var stock_table_id>.mirror_total_price, <dtml-var precision>)), 0) AS mirror_total_price
<dtml-else>
SUM(<dtml-var stock_table_id>.quantity <dtml-if transformed_uid> * transformation.quantity</dtml-if>) AS inventory,
SUM(<dtml-var stock_table_id>.quantity <dtml-if transformed_uid> * transformation.quantity</dtml-if>) AS total_quantity,
......@@ -20,7 +21,8 @@ SELECT
<dtml-if transformed_uid> * transformation.quantity</dtml-if>), 12)
AS converted_quantity,
</dtml-if>
IFNULL(SUM(<dtml-var stock_table_id>.total_price), 0) AS total_price
IFNULL(SUM(<dtml-var stock_table_id>.total_price), 0) AS total_price,
IFNULL(SUM(<dtml-var stock_table_id>.mirror_total_price), 0) AS mirror_total_price
</dtml-if>
<dtml-if inventory_list>
,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment