fix: refs #6403 take observation from ticket
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Pablo Natek 2024-07-23 12:29:08 +02:00
parent d8df9bc959
commit 80b338228e
1 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ module.exports = Self => {
CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference,
LPAD(IF(mw.serviceType IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth, '0') serviceType,
IF(mw.weekdays, 'S', 'N') weekDays,
oa.description deliveryObservation
ta.description deliveryObservation
FROM expedition e
JOIN ticket t ON e.ticketFk = t.id
JOIN agencyMode am ON am.id = t.agencyModeFk
@ -62,8 +62,8 @@ module.exports = Self => {
AND mw.weekDays & (1 << WEEKDAY(t.landed))
JOIN client c ON t.clientFk = c.id
JOIN address a ON t.addressFk = a.id
LEFT JOIN addressObservation oa ON oa.addressFk = a.id
AND oa.observationTypeFk IN (SELECT id FROM observationType ot WHERE ot.code = 'delivery')
LEFT JOIN ticketObservation ta ON ta.ticketFk = t.id
AND ta.observationTypeFk IN (SELECT id FROM observationType ot WHERE ot.code = 'delivery')
JOIN province p ON a.provinceFk = p.id
JOIN country co ON co.id = p.countryFk
JOIN mrwConfig mc