| @@ -1669,7 +1669,7 @@ open class DashboardService( | |||||
| + " from staff s" | + " from staff s" | ||||
| + " left join staff_allocation sa on sa.staff_id = s.id" | + " left join staff_allocation sa on sa.staff_id = s.id" | ||||
| + " left join project p on sa.project_id = p.id" | + " left join project p on sa.project_id = p.id" | ||||
| + " left join timesheet t on p.id = t.projectId" | |||||
| + " left join timesheet t on p.id = t.projectId and s.id = t.staffId " | |||||
| + " where s.id = :staffId" | + " where s.id = :staffId" | ||||
| + " and t.recordDate = :startdate" | + " and t.recordDate = :startdate" | ||||
| ) | ) | ||||
| @@ -1696,7 +1696,7 @@ open class DashboardService( | |||||
| + " from staff s" | + " from staff s" | ||||
| + " left join staff_allocation sa on sa.staff_id = s.id" | + " left join staff_allocation sa on sa.staff_id = s.id" | ||||
| + " left join project p on sa.project_id = p.id" | + " left join project p on sa.project_id = p.id" | ||||
| + " left join timesheet t on p.id = t.projectId" | |||||
| + " left join timesheet t on p.id = t.projectId and s.id = t.staffId" | |||||
| + " where s.id = :staffId" | + " where s.id = :staffId" | ||||
| + " and t.recordDate >= :startdate" | + " and t.recordDate >= :startdate" | ||||
| + " and t.recordDate <= :enddate" | + " and t.recordDate <= :enddate" | ||||
| @@ -1725,7 +1725,7 @@ open class DashboardService( | |||||
| + " from staff s" | + " from staff s" | ||||
| + " left join staff_allocation sa on sa.staff_id = s.id" | + " left join staff_allocation sa on sa.staff_id = s.id" | ||||
| + " left join project p on sa.project_id = p.id" | + " left join project p on sa.project_id = p.id" | ||||
| + " left join timesheet t on p.id = t.projectId" | |||||
| + " left join timesheet t on p.id = t.projectId and s.id = t.staffId" | |||||
| + " where s.id = :staffId" | + " where s.id = :staffId" | ||||
| + " and t.recordDate >= :startdate" | + " and t.recordDate >= :startdate" | ||||
| + " and t.recordDate <= last_day(:startdate)" | + " and t.recordDate <= last_day(:startdate)" | ||||