invoice added new columns
This commit is contained in:
@@ -20,6 +20,8 @@ class InvoiceOverview {
|
||||
private $needInvoice;
|
||||
private $projectDetails;
|
||||
private $projectnumber;
|
||||
private $projectPayment;
|
||||
private $invoicesToPay;
|
||||
|
||||
public function __construct( $project, $year )
|
||||
{
|
||||
@@ -35,7 +37,7 @@ class InvoiceOverview {
|
||||
return $this->projectDetails;
|
||||
}
|
||||
|
||||
public function getNeedinvoice( )
|
||||
public function getNeedinvoice()
|
||||
{
|
||||
return $this->needInvoice;
|
||||
}
|
||||
@@ -56,8 +58,12 @@ class InvoiceOverview {
|
||||
|
||||
$this->setTotalInvoicedThisYear();
|
||||
|
||||
$this->setPaymentPerProject();
|
||||
|
||||
$this->setInvoicesTotal();
|
||||
|
||||
$this->setInvoicesToPay();
|
||||
|
||||
$this->setNeedInvoice();
|
||||
|
||||
$this->setProjectDetails();
|
||||
@@ -104,12 +110,22 @@ class InvoiceOverview {
|
||||
Invoice::invoicePerYear( $this->project->id, $this->year, TRUE );
|
||||
}
|
||||
|
||||
private function setPaymentPerProject()
|
||||
{
|
||||
$this->projectPayment = Payment::getPaymentPerProject( $this->project->id );
|
||||
}
|
||||
|
||||
private function setInvoicesTotal()
|
||||
{
|
||||
$this->invoicesTotal =
|
||||
$this->totalInvoicedOtherYears + $this->totalInvoicedThisYear;
|
||||
}
|
||||
|
||||
private function setInvoicesToPay()
|
||||
{
|
||||
$this->invoicesToPay = $this->invoicesTotal - $this->projectPayment;
|
||||
}
|
||||
|
||||
private function setNeedInvoice()
|
||||
{
|
||||
$this->needInvoice =
|
||||
@@ -127,6 +143,8 @@ class InvoiceOverview {
|
||||
'totalInvoicedOtherYears' => number_format( $this->totalInvoicedOtherYears, 0, ',', '.' ),
|
||||
'totalInvoicedThisYear' => number_format( $this->totalInvoicedThisYear, 0, ',', '.' ),
|
||||
'invoicesTotal' => number_format( $this->invoicesTotal, 0, ',', '.' ),
|
||||
'projectPayment' => number_format( $this->projectPayment, 0, ',', '.' ),
|
||||
'invoiceToPay' => number_format( $this->invoicesToPay, 0, ',', '.' ),
|
||||
'needInvoice' => number_format( $this->needInvoice, 0, ',', '.' )
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user