Merge pull request 'fix: refs #6404 change db language on local' (!2534) from 6404-fixSaturdayDelivery into master
gitea/salix/pipeline/head This commit looks good Details
gitea/salix/pipeline/pr-test This commit looks good Details

Reviewed-on: #2534
Reviewed-by: Juan Ferrer <juan@verdnatura.es>
This commit is contained in:
Pablo Natek 2024-06-03 15:40:27 +00:00
commit 6b234f4664
1 changed files with 2 additions and 2 deletions

View File

@ -57,14 +57,14 @@ module.exports = Self => {
DATE_FORMAT(t.shipped, '%d/%m/%Y') created, DATE_FORMAT(t.shipped, '%d/%m/%Y') created,
t.shipped, t.shipped,
CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference, CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference,
LPAD(IF(mw.params IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth,'0') serviceType, LPAD(IF(mw.serviceType IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth,'0') serviceType,
IF(mw.weekdays, 'S', 'N') weekDays, IF(mw.weekdays, 'S', 'N') weekDays,
oa.description deliveryObservation oa.description deliveryObservation
FROM expedition e FROM expedition e
JOIN ticket t ON e.ticketFk = t.id JOIN ticket t ON e.ticketFk = t.id
JOIN agencyMode am ON am.id = t.agencyModeFk JOIN agencyMode am ON am.id = t.agencyModeFk
JOIN mrwService ms ON ms.agencyModeCodeFk = am.code JOIN mrwService ms ON ms.agencyModeCodeFk = am.code
LEFT JOIN mrwServiceWeekday mw ON mw.weekdays = DATE_FORMAT(t.shipped, '%a') LEFT JOIN mrwServiceWeekday mw ON mw.weekdays | 1 << WEEKDAY(t.landed)
JOIN client c ON t.clientFk = c.id JOIN client c ON t.clientFk = c.id
JOIN address a ON t.addressFk = a.id JOIN address a ON t.addressFk = a.id
LEFT JOIN addressObservation oa ON oa.addressFk = a.id LEFT JOIN addressObservation oa ON oa.addressFk = a.id