Commit 7813bf6e authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_core: 0 if null to not break calculate

parent 50c80c24
...@@ -24,7 +24,7 @@ from ...@@ -24,7 +24,7 @@ from
select select
month(date) as d_month, month(date) as d_month,
year(date) as d_year, year(date) as d_year,
SUM(IF(quantity>0, total_price, 0)) as incoming_total_price, SUM(IF(quantity>0, IFNULL(total_price, 0), 0)) as incoming_total_price,
SUM(IF(quantity>0, quantity, 0)) as incoming_total_quantity, SUM(IF(quantity>0, quantity, 0)) as incoming_total_quantity,
SUM(IF(quantity>0, 0, quantity)) as outgoing_total_quantity, SUM(IF(quantity>0, 0, quantity)) as outgoing_total_quantity,
SUM(quantity) as quantity_diff SUM(quantity) as quantity_diff
......
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