diff --git a/application/controllers/reports/EmployeeHoursController.php b/application/controllers/reports/EmployeeHoursController.php index abc74c5..df900cb 100644 --- a/application/controllers/reports/EmployeeHoursController.php +++ b/application/controllers/reports/EmployeeHoursController.php @@ -43,5 +43,15 @@ class EmployeeHoursController extends MY_Controller { $this->json( $monthlyhours ); } + public function getMonthlyEmployeehours( $month, $year ) + { + $sql = QEmployeeHours::fire( $month, $year ); + + $query = $this->db->query( $sql ); + + $result = $query->result(); + + $this->json( $result ); + } } \ No newline at end of file diff --git a/application/models/eloquent/queries/ProjecthoursPerEmployeePerMonth.php b/application/models/eloquent/queries/ProjecthoursPerEmployeePerMonth.php index 03e43a6..2304d68 100644 --- a/application/models/eloquent/queries/ProjecthoursPerEmployeePerMonth.php +++ b/application/models/eloquent/queries/ProjecthoursPerEmployeePerMonth.php @@ -46,6 +46,7 @@ class ProjecthoursPerEmployeePerMonth extends BaseModel { ->join( 'projectemployees AS PEM', 'PEM.id', '=', 'projecthours.projectemployee_id' ) ->join( 'projects AS PRJ', 'PRJ.id', '=', 'PEM.project_id' ) ->where( 'PEM.user_id', '=', $employeeID ) + ->where( 'projecthours.hourtype_id', '=', 1) ->groupBy('PRJ.id') ->groupBy('PEM.tarif') ->groupBy('PRJ.projectname') diff --git a/application/models/eloquent/queries/QEmployeeHours.php b/application/models/eloquent/queries/QEmployeeHours.php new file mode 100644 index 0000000..4c3a046 --- /dev/null +++ b/application/models/eloquent/queries/QEmployeeHours.php @@ -0,0 +1,59 @@ + + +
medewerker |
+ uren declarabel |
+ uren niet declarabel |
+ uren indirect |
+ totaal bestede uren |
+ uren target(1.600 jaar) |
+ aandeel uren besteed tov target |
+ bezettingsgraad totaal aantal gewerkte uren |
+ bezettingsgraad t.o.v. target factureerbare uren |
+ omzet |
+ gemiddeld tarief |
+
|---|---|---|---|---|---|---|---|---|---|---|
| + | + | + | + | + | + | % | +% | ++ | + | + | totaal | ++ | + | + | + | + | % | +% | +% | ++ | + + |