From 3e22cdb27068545b489921fbe9472dd45a71c763 Mon Sep 17 00:00:00 2001 From: Theo Weijmer Date: Sun, 27 May 2018 16:01:32 +0200 Subject: [PATCH] fix --- application/models/eloquent/queries/ReservationTotals.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/models/eloquent/queries/ReservationTotals.php b/application/models/eloquent/queries/ReservationTotals.php index b1fb1f5..51eae5d 100644 --- a/application/models/eloquent/queries/ReservationTotals.php +++ b/application/models/eloquent/queries/ReservationTotals.php @@ -12,9 +12,9 @@ class ReservationTotals { { // UNION ALL wordt gebruikt voor een full outer join $sql = "SELECT Q5.project_id AS projectID, external_id AS externalID, - costs, reservation, payed, (reservation - payed) AS saldo, - (costs - payed) AS saldoToPay, PRJ.projectnumber, EXT.contactperson, - ROUND(( (other_revenue * (100 + ( + Q5.costs, reservation, payed, (reservation - payed) AS saldo, + (Q5.costs - payed) AS saldoToPay, PRJ.projectnumber, EXT.contactperson, + ROUND(( (other_revenue * (100 + (SELECT vatrate from vats where active='T' LIMIT 1))) / 100 ), 0) other_revenue SELECT vatrate FROM vats VTS JOIN projects P @@ -60,4 +60,4 @@ class ReservationTotals { return $sql; } -} \ No newline at end of file +}