From d3dd500248c5c968bd8b5c356e41798511f3bde5 Mon Sep 17 00:00:00 2001 From: Theo Weijmer Date: Mon, 15 Apr 2019 14:26:05 +0200 Subject: [PATCH] visibility offres at timewriting --- application/models/eloquent/Offer.php | 4 ++-- application/models/eloquent/queries/EmployeehoursMonthly.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/application/models/eloquent/Offer.php b/application/models/eloquent/Offer.php index a391fe6..690b96d 100644 --- a/application/models/eloquent/Offer.php +++ b/application/models/eloquent/Offer.php @@ -47,8 +47,8 @@ class Offer extends BaseModel { public static function getOffersWithoutProject( ) { $offersWithoutProject = Offer::orderBy('startdate') - ->whereNull('rejectdate') - ->whereNull('project_id') +// ->whereNull('rejectdate') +// ->whereNull('project_id') ->whereArchive('F') ->get(); diff --git a/application/models/eloquent/queries/EmployeehoursMonthly.php b/application/models/eloquent/queries/EmployeehoursMonthly.php index e1933ff..a5fa1c3 100644 --- a/application/models/eloquent/queries/EmployeehoursMonthly.php +++ b/application/models/eloquent/queries/EmployeehoursMonthly.php @@ -25,7 +25,8 @@ class EmployeehoursMonthly { JOIN users USR ON USR.id = EMH.employee_id WHERE MONTH(hourdate) = {$month} - AND YEAR(hourdate) = {$year} "; + AND YEAR(hourdate) = {$year} + AND reportable = 'T' "; if( $employeeID != 0 ) $sql.="AND USR.id = {$employeeID} "; $sql.=" UNION