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
@@ -10,6 +10,7 @@ class Recapprojects {
private $ci;
private $index;
private $archive;
private $project;
private $projects;
private $employeeHours;
@@ -22,10 +23,12 @@ class Recapprojects {
private $projectEmployeeDetail;
private $projectEmployeeDetails;
public function __construct()
public function __construct( $archive )
{
$this->ci =& get_instance();
$this->archive = $archive;
$this->ci->load->Model( 'projects/Invoices_model' );
$this->handle();
@@ -51,7 +54,7 @@ class Recapprojects {
private function setProjects()
{
$this->projects = Project::getActiveProjects()->toArray();
$this->projects = Project::getActiveProjects( $this->archive )->toArray();
}
private function setUniqueEmployees()
@@ -222,8 +225,8 @@ class Recapprojects {
$this->projects[ $this->index ]['projectcosts'] -
$this->projects[ $this->index ]['totalInvoiced'];
if( $this->projects[ $this->index ]['workInProgress'] < 0 )
$this->projects[ $this->index ]['workInProgress'] = 0;
if ( $this->projects[ $this->index ]['workInProgress'] < 0 )
$this->projects[ $this->index ]['workInProgress'] = 0;
}
private function setCurrentFinancialYear()
@@ -19,6 +19,7 @@ class InvoiceOverview {
private $invoicesTotal;
private $needInvoice;
private $projectDetails;
private $projectnumber;
public function __construct( $project, $year )
{
@@ -41,6 +42,8 @@ class InvoiceOverview {
private function handle()
{
$this->setProjectnumber();
$this->setProjectname();
$this->setCustomer();
@@ -60,9 +63,14 @@ class InvoiceOverview {
$this->setProjectDetails();
}
private function setProjectnumber()
{
$this->projectnumber = $this->project->projectnumber;
}
private function setProjectname()
{
$this->projectname = $this->project->projectname . '(' . $this->project->projectnumber . ')';
$this->projectname = $this->project->projectname;
}
private function setCustomer()
@@ -111,6 +119,7 @@ class InvoiceOverview {
private function setProjectDetails()
{
$this->projectDetails = [
'projectnumber' => $this->projectnumber,
'projectname' => $this->projectname,
'customer' => $this->customer,
'totalToInvoicingExcl' => number_format( $this->totalToInvoicingExcl, 0, ',', '.' ),
@@ -20,10 +20,16 @@ class Invoices {
private $invoiceForecasts;
private $invoiceOverviews = [];
private $invoiceReport = [];
private $orderType;
private $orderDirection;
private $archive;
public function __construct( $year )
public function __construct( $year, $orderType, $orderDirection, $archive )
{
$this->year = $year;
$this->orderType = $orderType;
$this->orderDirection = $orderDirection;
$this->archive = $archive;
$this->handle();
}
@@ -44,7 +50,8 @@ class Invoices {
private function setProjects()
{
$this->projects = Project::getProjectsForReport();
$this->projects =
Project::getProjectsForReport( $this->orderType, $this->orderDirection, $this->archive );
}
private function loopProjects()