Merge branch 'master' into Hotfix-PriceDifferenceShipped
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2025-01-24 12:28:29 +00:00
commit 1890e5d541
1 changed files with 6 additions and 2 deletions

View File

@ -65,7 +65,8 @@ module.exports = Self => {
iss.id itemShelvingSaleFk,
iss.isPicked,
iss.itemShelvingFk,
st.code stateCode
st.code stateCode,
ac.username
FROM ticketCollection tc
LEFT JOIN collection c ON c.id = tc.collectionFk
JOIN sale s ON s.ticketFk = tc.ticketFk
@ -80,6 +81,7 @@ module.exports = Self => {
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
LEFT JOIN origin o ON o.id = i.originFk
LEFT JOIN state st ON st.id = sg.stateFk
LEFT JOIN account.user ac ON ac.id = iss.userFk
WHERE tc.collectionFk = ?
GROUP BY s.id, ish.id, p.code, p2.code
UNION ALL
@ -109,7 +111,8 @@ module.exports = Self => {
iss.id itemShelvingSaleFk,
iss.isPicked,
iss.itemShelvingFk,
st.code stateCode
st.code stateCode,
ac.username
FROM sectorCollection sc
JOIN sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
JOIN saleGroup sg ON sg.id = ss.saleGroupFk
@ -124,6 +127,7 @@ module.exports = Self => {
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
LEFT JOIN origin o ON o.id = i.originFk
LEFT JOIN state st ON st.id = sg.stateFk
LEFT JOIN account.user ac ON ac.id = sg.userFk
WHERE sc.id = ?
AND sgd.saleGroupFk
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);