Diverse wijzigingen nav word document
This commit is contained in:
@@ -8,104 +8,105 @@
|
||||
|
||||
class Invoices {
|
||||
|
||||
private $year;
|
||||
private $project;
|
||||
private $projects;
|
||||
private $monthPayment;
|
||||
private $monthPayments;
|
||||
private $monthForecast;
|
||||
private $monthForecasts;
|
||||
private $invoiceOverview;
|
||||
private $invoiceForecast;
|
||||
private $invoiceForecasts;
|
||||
private $invoiceOverviews = [];
|
||||
private $invoiceReport = [];
|
||||
private $orderType;
|
||||
private $orderDirection;
|
||||
private $archive;
|
||||
private $year;
|
||||
private $project;
|
||||
private $projects;
|
||||
private $monthPayment;
|
||||
private $monthPayments;
|
||||
private $monthForecast;
|
||||
private $monthForecasts;
|
||||
private $invoiceOverview;
|
||||
private $invoiceForecast;
|
||||
private $invoiceForecasts;
|
||||
private $invoiceOverviews = [];
|
||||
private $invoiceReport = [];
|
||||
private $orderType;
|
||||
private $orderDirection;
|
||||
private $archive;
|
||||
|
||||
public function __construct( $year, $orderType, $orderDirection, $archive )
|
||||
{
|
||||
$this->year = $year;
|
||||
$this->orderType = $orderType;
|
||||
$this->orderDirection = $orderDirection;
|
||||
$this->archive = $archive;
|
||||
public function __construct( $year, $orderType, $orderDirection, $archive )
|
||||
{
|
||||
$this->year = $year;
|
||||
$this->orderType = $orderType;
|
||||
$this->orderDirection = $orderDirection;
|
||||
$this->archive = $archive;
|
||||
|
||||
$this->handle();
|
||||
}
|
||||
$this->handle();
|
||||
}
|
||||
|
||||
public function getInvoiceReport()
|
||||
{
|
||||
return $this->invoiceReport;
|
||||
}
|
||||
public function getInvoiceReport()
|
||||
{
|
||||
return $this->invoiceReport;
|
||||
}
|
||||
|
||||
private function handle()
|
||||
{
|
||||
$this->setProjects();
|
||||
private function handle()
|
||||
{
|
||||
$this->setProjects();
|
||||
|
||||
$this->loopProjects();
|
||||
$this->loopProjects();
|
||||
|
||||
$this->setInvoiceReport();
|
||||
}
|
||||
//only projects with payments also archived projects
|
||||
$this->setMonthPayments();
|
||||
|
||||
private function setProjects()
|
||||
{
|
||||
$this->projects =
|
||||
Project::getProjectsForReport( $this->orderType, $this->orderDirection, $this->archive );
|
||||
}
|
||||
$this->setInvoiceReport();
|
||||
}
|
||||
|
||||
private function loopProjects()
|
||||
{
|
||||
foreach ( $this->projects as $this->project )
|
||||
{
|
||||
$this->setInvoiceOverview();
|
||||
private function setProjects()
|
||||
{
|
||||
$this->projects =
|
||||
Project::getProjectsForReport( $this->orderType, $this->orderDirection, $this->archive );
|
||||
}
|
||||
|
||||
$this->setInvoiceForecasts();
|
||||
private function loopProjects()
|
||||
{
|
||||
foreach ( $this->projects as $this->project )
|
||||
{
|
||||
$this->setInvoiceOverview();
|
||||
|
||||
$this->setMonthForecasts();
|
||||
$this->setInvoiceForecasts();
|
||||
|
||||
$this->setMonthPayments();
|
||||
}
|
||||
}
|
||||
$this->setMonthForecasts();
|
||||
}
|
||||
}
|
||||
|
||||
private function setInvoiceOverview()
|
||||
{
|
||||
$this->invoiceOverview = new InvoiceOverview( $this->project, $this->year );
|
||||
private function setInvoiceOverview()
|
||||
{
|
||||
$this->invoiceOverview = new InvoiceOverview( $this->project, $this->year );
|
||||
|
||||
$this->invoiceOverviews[] = $this->invoiceOverview->getProjectDetails();
|
||||
}
|
||||
$this->invoiceOverviews[] = $this->invoiceOverview->getProjectDetails();
|
||||
}
|
||||
|
||||
private function setInvoiceForecasts()
|
||||
{
|
||||
$this->invoiceForecast =
|
||||
new InvoiceForecast( $this->project, $this->invoiceOverview->getNeedinvoice(), $this->year );
|
||||
private function setInvoiceForecasts()
|
||||
{
|
||||
$this->invoiceForecast =
|
||||
new InvoiceForecast( $this->project, $this->invoiceOverview->getNeedinvoice(), $this->year );
|
||||
|
||||
$this->invoiceForecasts[] = $this->invoiceForecast->getProjectDetails();
|
||||
}
|
||||
$this->invoiceForecasts[] = $this->invoiceForecast->getProjectDetails();
|
||||
}
|
||||
|
||||
public function setMonthForecasts()
|
||||
{
|
||||
$this->monthForecast =
|
||||
new MonthForecast( $this->invoiceForecast, $this->project, $this->year );
|
||||
public function setMonthForecasts()
|
||||
{
|
||||
$this->monthForecast =
|
||||
new MonthForecast( $this->invoiceForecast, $this->project, $this->year );
|
||||
|
||||
$this->monthForecasts[] = $this->monthForecast->getProjectDetails();
|
||||
}
|
||||
$this->monthForecasts[] = $this->monthForecast->getProjectDetails();
|
||||
}
|
||||
|
||||
public function setMonthPayments()
|
||||
{
|
||||
$this->monthPayment =
|
||||
new MonthPayments( $this->project, $this->year );
|
||||
public function setMonthPayments()
|
||||
{
|
||||
$monthPayment = new MonthPayments(
|
||||
$this->year, $this->orderType, $this->orderDirection );
|
||||
|
||||
$this->monthPayments[] = $this->monthPayment->getProjectDetails();
|
||||
}
|
||||
$this->monthPayments = $monthPayment->getProjectDetails();
|
||||
}
|
||||
|
||||
private function setInvoiceReport()
|
||||
{
|
||||
$this->invoiceReport = [
|
||||
'invoiceOverview' => $this->invoiceOverviews,
|
||||
'forecasts' => $this->invoiceForecasts,
|
||||
'monthForecasts' => $this->monthForecasts,
|
||||
'monthPayments' => $this->monthPayments
|
||||
];
|
||||
}
|
||||
}
|
||||
private function setInvoiceReport()
|
||||
{
|
||||
$this->invoiceReport = [
|
||||
'invoiceOverview' => $this->invoiceOverviews,
|
||||
'forecasts' => $this->invoiceForecasts,
|
||||
'monthForecasts' => $this->monthForecasts,
|
||||
'monthPayments' => $this->monthPayments
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user