Diverse aanpassing nav mail Peter

This commit is contained in:
2019-02-22 14:19:03 +01:00
parent d71692f320
commit 695f6c6960
23 changed files with 295 additions and 79 deletions
@@ -70,6 +70,7 @@ class EmployeeHoursController extends MY_Controller {
}
elseif ( $hourType == 'OFFERS' )
{
$data['projectemployee_id'] = $data['employee_id'];
unset( $data['employee_id'] );
$data['hourtype_id'] = $data['hourtype_id'] - 8;
@@ -27,14 +27,14 @@ class ProjectsController extends MY_Controller {
}
public function getAllProjects( )
public function getAllProjects()
{
$archive = $this->clean_input( 'archive' );
$search = $this->clean_input( 'search' );
$order = $this->clean_input( 'order' );
$direction = $this->clean_input( 'direction' );
$projects = Project::getAllProjects( $archive, $search, $order, $direction );
$projects = Project::getAllProjects( $archive, $search, $order, $direction );
$this->json( $projects );
}
@@ -46,6 +46,9 @@ class ProjectsController extends MY_Controller {
$project->invoiceDetails =
$this->Invoices_model->getOutstandingPerProject( $project->id );
$project->hourTotals =
Projecthour::getTotalHoursPerProject( $project->id );
$this->json( $project );
}
@@ -27,9 +27,9 @@ class ReportsController extends MY_Controller {
}
public function recapProjects()
public function recapProjects( $archive )
{
$recapprojects = new Recapprojects();
$recapprojects = new Recapprojects( $archive );
$projects = $recapprojects->getProjects();
@@ -51,17 +51,17 @@ class ReportsController extends MY_Controller {
$result = $query->result();
foreach($result as $user)
foreach ( $result as $user )
{
$user->targethours = Employeetarget::getTargetHoursPerEmployee( $user->user_id, $year, $month);
$user->targethours = Employeetarget::getTargetHoursPerEmployee( $user->user_id, $year, $month );
}
$this->json( $result );
}
public function getInvoiceOverview( $year = FALSE )
public function getInvoiceOverview( $year = FALSE, $orderType, $orderDirection, $archive )
{
$invoices = new Invoices( $year );
$invoices = new Invoices( $year, $orderType, $orderDirection, $archive );
$invoiceReport = $invoices->getInvoiceReport();
@@ -74,7 +74,7 @@ class ReportsController extends MY_Controller {
$invoiceReport = $invoices->getInvoiceReport();
new InvoiceSpreadsheet($invoiceReport);
new InvoiceSpreadsheet( $invoiceReport );
}
public function saveCurrentFinnacialYear( $projectID )