fix: refs #6861 refs#6861 showUsername

This commit is contained in:
Sergio De la torre 2025-01-24 08:25:44 +01:00
parent e4733b5102
commit df97534882
1 changed files with 7 additions and 3 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
@ -79,7 +80,8 @@ module.exports = Self => {
LEFT JOIN parking p ON p.id = sh.parkingFk
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 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);