|
@@ -232,6 +232,7 @@ class reportsController extends Staple_Controller
|
|
$date->setTime(0,0,0);
|
|
$date->setTime(0,0,0);
|
|
|
|
|
|
$year = $date->format('Y');
|
|
$year = $date->format('Y');
|
|
|
|
+
|
|
$this->view->year = $year;
|
|
$this->view->year = $year;
|
|
|
|
|
|
$nextYear = $date->modify('+1 year')->format('Y');
|
|
$nextYear = $date->modify('+1 year')->format('Y');
|
|
@@ -253,7 +254,6 @@ class reportsController extends Staple_Controller
|
|
$date->setTime(0,0,0);
|
|
$date->setTime(0,0,0);
|
|
|
|
|
|
$newDate = new DateTime();
|
|
$newDate = new DateTime();
|
|
-
|
|
|
|
switch($month)
|
|
switch($month)
|
|
{
|
|
{
|
|
case 1:
|
|
case 1:
|
|
@@ -268,6 +268,7 @@ class reportsController extends Staple_Controller
|
|
$date2 = new DateTime();
|
|
$date2 = new DateTime();
|
|
$date2->setDate($year,$month,25);
|
|
$date2->setDate($year,$month,25);
|
|
$date2->setTime(24,00,00);
|
|
$date2->setTime(24,00,00);
|
|
|
|
+
|
|
$interval = date_diff($newDate,$date2);
|
|
$interval = date_diff($newDate,$date2);
|
|
|
|
|
|
$span = $interval->days;
|
|
$span = $interval->days;
|
|
@@ -275,6 +276,11 @@ class reportsController extends Staple_Controller
|
|
|
|
|
|
$this->view->date = $date->format("F Y");
|
|
$this->view->date = $date->format("F Y");
|
|
|
|
|
|
|
|
+ $date = new dateTime();
|
|
|
|
+ $date->setDate($year, $month, 25);
|
|
|
|
+ $this->view->currentDate = $date->format('Y-m-d');
|
|
|
|
+ $this->view->previousDate = $date->modify('-1 month +1 day')->format('Y-m-d');
|
|
|
|
+
|
|
$reports = new reportModel($year, $month);
|
|
$reports = new reportModel($year, $month);
|
|
$this->view->report = $reports->payPeriodTotals($year, $month);
|
|
$this->view->report = $reports->payPeriodTotals($year, $month);
|
|
}
|
|
}
|
|
@@ -361,6 +367,11 @@ class reportsController extends Staple_Controller
|
|
$date->modify("+$days days");
|
|
$date->modify("+$days days");
|
|
$this->view->endDate = $date->format("F jS Y");
|
|
$this->view->endDate = $date->format("F jS Y");
|
|
|
|
|
|
|
|
+ $date = new dateTime();
|
|
|
|
+ $date->setDate($year, $month, 25);
|
|
|
|
+ $this->view->currentDate = $date->format('Y-m-d');
|
|
|
|
+ $this->view->previousDate = $date->modify('-1 month +1 day')->format('Y-m-d');
|
|
|
|
+
|
|
$codes = new codeModel();
|
|
$codes = new codeModel();
|
|
$this->view->codes = $codes->allCodes();
|
|
$this->view->codes = $codes->allCodes();
|
|
|
|
|