refs #6921 feat: getTicketsObservations
gitea/salix/pipeline/pr-dev Build queued... Details

This commit is contained in:
Sergio De la torre 2024-04-10 12:02:25 +02:00
parent b46102653b
commit 9c373d9ef3
1 changed files with 4 additions and 1 deletions

View File

@ -44,13 +44,13 @@ module.exports = Self => {
st.name ticketStateName,
wh.name warehouseName,
tob.description ticketObservation,
tob2.description ticketObservationDropOff,
a.street,
a.postalCode,
a.city,
am.name agencyModeName,
u.nickname userNickname,
vn.ticketTotalVolume(t.id) volume,
tob.description,
GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk) ipt,
c.phone clientPhone,
c.mobile clientMobile,
@ -72,6 +72,9 @@ module.exports = Self => {
LEFT JOIN observationType ot ON ot.code = 'delivery'
LEFT JOIN ticketObservation tob ON tob.ticketFk = t.id
AND tob.observationTypeFk = ot.id
LEFT JOIN observationType ot2 ON ot2.code = 'dropOff'
LEFT JOIN ticketObservation tob2 ON tob2.ticketFk = t.id
AND tob2.observationTypeFk = ot2.id
LEFT JOIN address a ON a.id = t.addressFk
LEFT JOIN agencyMode am ON am.id = t.agencyModeFk
LEFT JOIN account.user u ON u.id = r.workerFk