Invoiced report

This commit is contained in:
2020-01-10 17:42:25 +01:00
parent b4d69d272c
commit 5594865554
11 changed files with 384 additions and 190 deletions
@@ -11,7 +11,8 @@ class ReservationTotals {
public static function fire()
{
// UNION ALL wordt gebruikt voor een full outer join
$sql = " SELECT PRJ.id AS projectID, external_id AS externalID,
$sql = "SELECT PRJ.id AS projectID, external_id AS externalID,
PRJ.projectname,
COALESCE(fromreservation, 0) AS fromreservation,
COALESCE(Q5.costs, 0) AS costs, COALESCE(reservation, 0) AS reservation,
COALESCE(payed, 0) AS payed, (COALESCE(reservation, 0) - COALESCE(fromreservation, 0)) AS saldo,