Skip to content

Commit

Permalink
projects.php week cal corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
go-faustino committed Jan 7, 2018
1 parent ad75387 commit 95cd496
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions application/modules/timemanagement/models/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,20 @@ public function getPreviousDaysTSStatus($prevweeks,$emp_id,$emp_details)
$emp_dept_id = $emp_details['department_id'];
$join_date=new DateTime($emp_details['date_of_joining']);
$join_date=$join_date->format('Y-m-d');
$resultData = $notificationModel->getpreviousTimesheetStatus($emp_id,$hidendweek_date,$mnth,$year);
$savedTimeSheets = $notificationModel->getpreviousSavedTimesheets($emp_id,$hidendweek_date,$mnth,$year);

$startCalWeek = strftime('%U',strtotime($yr_mnth.'-01'));

if($startCalWeek == "00") {
$prevYear = $year - 1;
$prev_year_hidendweek_date = $prevYear.'-12-31';

$resultData = $notificationModel->getpreviousTimesheetStatus($emp_id,$prev_year_hidendweek_date,$mnth,$year);
$savedTimeSheets = $notificationModel->getpreviousSavedTimesheets($emp_id,$prev_year_hidendweek_date,$mnth,$year);
} else {
$resultData = $notificationModel->getpreviousTimesheetStatus($emp_id,$hidendweek_date,$mnth,$year);
$savedTimeSheets = $notificationModel->getpreviousSavedTimesheets($emp_id,$hidendweek_date,$mnth,$year);
}

//End
if(count($resultData)>0)
{
Expand Down

0 comments on commit 95cd496

Please sign in to comment.