diff --git a/back/methods/collection/getTickets.js b/back/methods/collection/getTickets.js index 85d1111df..dfe86c94c 100644 --- a/back/methods/collection/getTickets.js +++ b/back/methods/collection/getTickets.js @@ -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);