7691-testToMaster #2703
|
@ -108,13 +108,14 @@ module.exports = Self => {
|
||||||
LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = s.id
|
LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = s.id
|
||||||
LEFT JOIN parking p2 ON p2.id = sg.parkingFk
|
LEFT JOIN parking p2 ON p2.id = sg.parkingFk
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
LEFT JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
|
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
|
||||||
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 sc.id = ?
|
WHERE sc.id = ?
|
||||||
|
AND sgd.saleGroupFk
|
||||||
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);
|
GROUP BY s.id, ish.id, p.code, p2.code`, [id, id], myOptions);
|
||||||
if (print)
|
if (print)
|
||||||
await Self.rawSql(`CALL vn.collection_printSticker(?, ?)`, [id, null], myOptions);
|
await Self.rawSql(`CALL vn.collection_printSticker(?, ?)`, [id, null], myOptions);
|
||||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.sale
|
CREATE OR REPLACE TEMPORARY TABLE tmp.sale
|
||||||
(INDEX(saleFk))
|
(INDEX(saleFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT s.id
|
SELECT s.id saleFk, str.workerFk userFK
|
||||||
FROM sectorCollectionSaleGroup sc
|
FROM sectorCollectionSaleGroup sc
|
||||||
JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk
|
JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk
|
||||||
JOIN sale s ON sg.saleFk = s.id
|
JOIN sale s ON sg.saleFk = s.id
|
||||||
|
|
Loading…
Reference in New Issue