Report project revenue null blank cell to 0
This commit is contained in:
parent
24ace4bf2f
commit
75552a8e0e
|
@ -198,13 +198,13 @@ class ProjectRevenueCustomReport2(models.Model):
|
|||
AAL.unit_amount,
|
||||
COALESCE(pro_emp.price_unit, 0) as pro_hourly_rate,
|
||||
case when pro_emp.employee_price is null then ((AAL.amount * -1)/NULLIF(AAL.unit_amount, 0)) else pro_emp.employee_price end as timesheet_cost,
|
||||
(AAL.unit_amount * pro_emp.price_unit) AS actual_revenue,
|
||||
(AAL.unit_amount * COALESCE(pro_emp.price_unit, 0)) AS actual_revenue,
|
||||
case when pro_emp.employee_price is null then (AAL.amount * -1) else (AAL.unit_amount * pro_emp.employee_price) end as actual_cost,
|
||||
0.0 AS expenses_amt,
|
||||
(AAL.unit_amount * pro_emp.price_unit) - case when pro_emp.employee_price is null then (AAL.amount * -1) else (AAL.unit_amount * pro_emp.employee_price) end
|
||||
(AAL.unit_amount * COALESCE(pro_emp.price_unit, 0)) - case when pro_emp.employee_price is null then (AAL.amount * -1) else (AAL.unit_amount * pro_emp.employee_price) end
|
||||
as profit_amt,
|
||||
(((AAL.unit_amount * pro_emp.price_unit) - case when pro_emp.employee_price is null then (AAL.amount * -1) else (AAL.unit_amount * pro_emp.employee_price) end)
|
||||
/ NULLIF((AAL.unit_amount * pro_emp.price_unit), 0)) * 100 as profit_per,
|
||||
(((AAL.unit_amount * COALESCE(pro_emp.price_unit, 0)) - case when pro_emp.employee_price is null then (AAL.amount * -1) else (AAL.unit_amount * pro_emp.employee_price) end)
|
||||
/ NULLIF((AAL.unit_amount * COALESCE(pro_emp.price_unit, 0)), 0)) * 100 as profit_per,
|
||||
AAL.start_datetime AS timesheet_sdatetime
|
||||
FROM project_project PRO
|
||||
LEFT JOIN account_analytic_account AA ON PRO.analytic_account_id = AA.id
|
||||
|
|
Loading…
Reference in New Issue