diff --git a/application/libraries/reports/invoice/Invoices.php b/application/libraries/reports/invoice/Invoices.php index bc5b56b..a60d8a2 100644 --- a/application/libraries/reports/invoice/Invoices.php +++ b/application/libraries/reports/invoice/Invoices.php @@ -108,7 +108,7 @@ class Invoices { private function setInvoiced() { - $this->invoiced = Invoice::getInvoiced( $this->year ); + $this->invoiced = Invoice::getInvoiced( $this->year, $this->orderType, $this->orderDirection ); } private function setInvoicedYears() diff --git a/application/libraries/reports/invoice/MonthForecast.php b/application/libraries/reports/invoice/MonthForecast.php index 74a6274..c2fb537 100644 --- a/application/libraries/reports/invoice/MonthForecast.php +++ b/application/libraries/reports/invoice/MonthForecast.php @@ -79,6 +79,7 @@ class MonthForecast { private function setProjectDetails() { $this->projectDetails = [ + 'projectnumber' => $this->project->projectnumber, 'projectname' => $this->projectname, 'customer' => $this->customer, 'needInvoice' => number_format( $this->invoiceForecast->getNeedInvoice(), 0, ',', '.' ), @@ -88,4 +89,4 @@ class MonthForecast { ]; } -} \ No newline at end of file +} diff --git a/application/libraries/reports/invoice/MonthPayments.php b/application/libraries/reports/invoice/MonthPayments.php index 01edb38..0508e8f 100644 --- a/application/libraries/reports/invoice/MonthPayments.php +++ b/application/libraries/reports/invoice/MonthPayments.php @@ -118,6 +118,7 @@ class MonthPayments { private function setProjectDetails() { $this->projectDetails[] = [ + 'projectnumber' => $this->project->projectnumber, 'projectname' => $this->projectname, 'customer' => $this->customer, 'monthPayments' => $this->monthPayments, diff --git a/application/models/eloquent/Invoice.php b/application/models/eloquent/Invoice.php index 9fdb7b0..d4c6b1c 100644 --- a/application/models/eloquent/Invoice.php +++ b/application/models/eloquent/Invoice.php @@ -63,13 +63,13 @@ class Invoice extends BaseModel { return $invoiceID; } - public static function getInvoiced( $year ) + public static function getInvoiced( $year, $orderType='invoicedate', $orderDirection='DESC' ) { $invoiced = Invoice::selectRaw('invoicenumber, PRJ.projectname, projectnumber, CUS.name, invoicedate, CUS.name, ROUND(invoiceamount, 0) AS invoiceamount') ->join('projects AS PRJ', 'PRJ.id', '=', 'invoices.project_id') ->join('customers AS CUS', 'CUS.id', '=', 'PRJ.customer_id') ->whereRaw("DATE_FORMAT(invoicedate, '%Y') = {$year}") - ->orderBy('invoicedate') + ->orderBy($orderType, $orderDirection) ->get(); return $invoiced; diff --git a/application/views/reports/invoices/invoices_report.php b/application/views/reports/invoices/invoices_report.php index 7b1529d..2bb9645 100644 --- a/application/views/reports/invoices/invoices_report.php +++ b/application/views/reports/invoices/invoices_report.php @@ -3,6 +3,13 @@
|
+
+
+ projectnummer
+
+
+ |
factuurnummer | @@ -28,6 +35,9 @@|||||||
|---|---|---|---|---|---|---|---|---|
| + + | diff --git a/application/views/reports/invoices/monthforecast_report.php b/application/views/reports/invoices/monthforecast_report.php index af2aba0..45bb680 100644 --- a/application/views/reports/invoices/monthforecast_report.php +++ b/application/views/reports/invoices/monthforecast_report.php @@ -1,6 +1,13 @@ |
|
+
+
+ projectnummer
+
+
+ |
project
|
@@ -26,7 +33,8 @@
|||
|---|---|---|---|---|
| + | + | @@ -58,4 +66,4 @@ |
|
+
+
+ projectnummer
+
+
+ |
project
|
@@ -20,7 +27,8 @@
|||
|---|---|---|---|---|
| + | + | @@ -44,4 +52,4 @@ |