6921_addFromDelivery #2304

Merged
sergiodt merged 18 commits from 6921_addFromDelivery into dev 2024-04-22 10:33:34 +00:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 9c373d9ef3 - Show all commits

View File

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