Revision c9860c6f
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
201 | 201 |
|
202 | 202 |
$query = |
203 | 203 |
qq|SELECT oe.id, oe.transdate, oe.reqdate, oe.quonumber, oe.transaction_description, oe.amount, |
204 |
CASE WHEN (COALESCE(0, oe.customer_id) = 0) THEN 'vendor' ELSE 'customer' END AS vc, |
|
204 | 205 |
c.name AS customer, |
206 |
v.name AS vendor, |
|
205 | 207 |
e.name AS employee |
206 | 208 |
FROM oe |
207 | 209 |
LEFT JOIN customer c ON (oe.customer_id = c.id) |
210 |
LEFT JOIN vendor v ON (oe.vendor_id = v.id) |
|
208 | 211 |
LEFT JOIN employee e ON (oe.employee_id = e.id) |
209 | 212 |
WHERE (COALESCE(quotation, FALSE) = TRUE) |
210 | 213 |
AND (COALESCE(closed, FALSE) = FALSE) |
Auch abrufbar als: Unified diff
TODO-Liste: Preisanfragen und Angebote richtig anzeigen.