2020-09-25 12:45:00 +00:00
|
|
|
SELECT
|
|
|
|
t.id,
|
|
|
|
t.shipped,
|
2021-06-18 06:42:55 +00:00
|
|
|
c.code companyCode,
|
2022-10-25 11:27:04 +00:00
|
|
|
t.packages,
|
2022-10-25 13:03:09 +00:00
|
|
|
tto.description
|
2020-09-25 12:45:00 +00:00
|
|
|
FROM ticket t
|
|
|
|
JOIN company c ON c.id = t.companyFk
|
2022-10-25 13:03:09 +00:00
|
|
|
LEFT JOIN ticketObservation tto
|
|
|
|
ON tto.ticketFk = t.id
|
|
|
|
AND tto.observationTypeFk = (SELECT id FROM observationType WHERE code = 'deliveryNote')
|
|
|
|
WHERE t.id = ?
|