refs #5890: fix(Collection/getTickets): accepts iss.quantity nulls
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
1277bec801
commit
4735307f5d
|
@ -49,7 +49,7 @@ module.exports = Self => {
|
||||||
ish.packing,
|
ish.packing,
|
||||||
ish.grouping,
|
ish.grouping,
|
||||||
s.isAdded,
|
s.isAdded,
|
||||||
s.originalQuantity,
|
s.originalQuantity,
|
||||||
s.quantity saleQuantity,
|
s.quantity saleQuantity,
|
||||||
iss.quantity reservedQuantity,
|
iss.quantity reservedQuantity,
|
||||||
SUM(iss.quantity) OVER (PARTITION BY s.id ORDER BY ish.id) accumulatedQuantity,
|
SUM(iss.quantity) OVER (PARTITION BY s.id ORDER BY ish.id) accumulatedQuantity,
|
||||||
|
@ -74,7 +74,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN parking p ON p.id = sh.parkingFk
|
LEFT JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
WHERE tc.collectionFk = ? AND iss.quantity IS NOT NULL
|
WHERE tc.collectionFk = ?
|
||||||
GROUP BY s.id, ish.id, p.code, p2.code
|
GROUP BY s.id, ish.id, p.code, p2.code
|
||||||
ORDER BY pickingOrder;`, [id], myOptions);
|
ORDER BY pickingOrder;`, [id], myOptions);
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN vn.buy c ON c.itemFk = s.itemFk
|
LEFT JOIN vn.buy c ON c.itemFk = s.itemFk
|
||||||
LEFT JOIN vn.entry e ON e.id = c.entryFk
|
LEFT JOIN vn.entry e ON e.id = c.entryFk
|
||||||
LEFT JOIN vn.travel tr ON tr.id = e.travelFk
|
LEFT JOIN vn.travel tr ON tr.id = e.travelFk
|
||||||
WHERE s.ticketFk = ?
|
WHERE s.ticketFk = ?
|
||||||
AND tr.landed >= util.VN_CURDATE() - INTERVAL 1 YEAR`,
|
AND tr.landed >= util.VN_CURDATE() - INTERVAL 1 YEAR`,
|
||||||
[ticketId], myOptions);
|
[ticketId], myOptions);
|
||||||
ticket.sales = [];
|
ticket.sales = [];
|
||||||
|
|
Loading…
Reference in New Issue