nieuwe kolommen bij offertes / employeehours reportable

This commit is contained in:
2019-05-07 21:20:35 +02:00
parent ddea739199
commit 2738f8aa78
3 changed files with 29 additions and 17 deletions
@@ -29,8 +29,11 @@ class QEmployeeHours {
0 AS nonprofitablehours,
0 AS revenues,
SUM(hours) AS nonprojecthours
FROM employeehours
WHERE YEAR(hourdate) = '{$year}' ";
FROM employeehours EMH
JOIN hourtypes HTY
ON HTY.id = EMH.hourtype_id
WHERE YEAR(hourdate) = '{$year}'
AND reportable = 'T' ";
if( $month != 0 ) $sql .= "AND MONTH(hourdate) = '$month' ";
$sql .= "
GROUP BY employee_id, MONTH(hourdate)