2021-02-24 06:51:05 +00:00
|
|
|
SELECT
|
|
|
|
t.id,
|
|
|
|
t.shipped,
|
2023-03-21 13:08:34 +00:00
|
|
|
t.nickname,
|
2023-12-07 12:47:07 +00:00
|
|
|
tto.description,
|
|
|
|
t.addressFk,
|
|
|
|
a.street
|
2023-03-21 13:08:34 +00:00
|
|
|
FROM invoiceOut io
|
2023-03-22 08:07:22 +00:00
|
|
|
JOIN ticket t ON t.refFk = io.REF
|
2023-12-07 12:47:07 +00:00
|
|
|
JOIN `address` a ON a.id = t.addressFk
|
2023-03-22 08:07:22 +00:00
|
|
|
LEFT JOIN observationType ot ON ot.code = 'invoiceOut'
|
2023-03-21 13:08:34 +00:00
|
|
|
LEFT JOIN ticketObservation tto ON tto.ticketFk = t.id
|
2023-03-22 08:07:22 +00:00
|
|
|
AND tto.observationTypeFk = ot.id
|
2022-07-21 08:05:37 +00:00
|
|
|
WHERE t.refFk = ?
|
2023-03-21 13:08:34 +00:00
|
|
|
ORDER BY t.shipped
|