Timeline diff query updated
This commit is contained in:
parent
5f712f2b54
commit
1d7eae7061
|
@ -56,7 +56,8 @@ class ProjectTimelineReport(models.Model):
|
|||
date AS enddate,
|
||||
'Budgeted' as timeline_type,
|
||||
pro.budgeted_hours2 as hours,
|
||||
DATE_PART('day', AGE(date, date_start)) AS timeline,
|
||||
(date - datestart) as timeline,
|
||||
--DATE_PART('day', AGE(date, date_start)) AS timeline,
|
||||
pro.*
|
||||
FROM
|
||||
project_project PRO
|
||||
|
@ -70,7 +71,8 @@ class ProjectTimelineReport(models.Model):
|
|||
(select max(al.end_datetime::date) from account_analytic_line as al where pro.id=al.project_id) as enddate,
|
||||
'Actual' as timeline_type,
|
||||
sum(unit_amount) as hours,
|
||||
DATE_PART('day', AGE((select max(al.end_datetime::date) from account_analytic_line as al where pro.id=al.project_id), (select min(al.start_datetime::date) from account_analytic_line as al where pro.id=al.project_id))) AS timeline,
|
||||
((select max(al.end_datetime::date) from account_analytic_line as al where pro.id=al.project_id) - (select min(al.start_datetime::date) from account_analytic_line as al where pro.id=al.project_id)) AS timeline,
|
||||
--DATE_PART('day', AGE((select max(al.end_datetime::date) from account_analytic_line as al where pro.id=al.project_id), (select min(al.start_datetime::date) from account_analytic_line as al where pro.id=al.project_id))) AS timeline,
|
||||
pro.*
|
||||
FROM project_project PRO
|
||||
LEFT JOIN account_analytic_account AA ON PRO.analytic_account_id = AA.id
|
||||
|
|
Loading…
Reference in New Issue