Diversen dashboard

This commit is contained in:
2020-01-31 15:56:51 +01:00
parent 63ac729032
commit 10d991f4c7
6 changed files with 104 additions and 26 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ class Invoice extends BaseModel {
public static function getInvoiced( $year )
{
$invoiced = Invoice::selectRaw('invoicenumber, PRJ.projectname, projectnumber, CUS.name, invoicedate, CUS.name, invoiceamount')
$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}")