Diversen nav opmerkingen
This commit is contained in:
@@ -23,7 +23,6 @@ class Qinvoiceoverview {
|
||||
CONCAT(firstname, ' ', middlename, ' ', lastname) AS fullname,
|
||||
( SELECT vatrate FROM vats WHERE archive = 'F' LIMIT 1 ) AS vatrate,
|
||||
COALESCE(reserved, 0 ) AS reserved,
|
||||
COALESCE(reservedpayed, 0 ) AS reservedpayed,
|
||||
COALESCE(currentforecast, 0) AS currentforecast,
|
||||
COALESCE(otherforecast, 0) AS otherforecast
|
||||
FROM invoices INV
|
||||
@@ -47,8 +46,7 @@ class Qinvoiceoverview {
|
||||
ON INV.id = Q1.invoice_id
|
||||
LEFT JOIN (
|
||||
SELECT project_id,
|
||||
SUM(IF(payed='UNPAYED', reservationamount, 0)) reserved,
|
||||
SUM(IF(payed='PAYED', reservationamount, 0)) reservedpayed
|
||||
SUM( reservationamount) reserved
|
||||
FROM reservations
|
||||
GROUP BY project_id
|
||||
) AS Q2
|
||||
|
||||
Reference in New Issue
Block a user