Merge pull request 'refs #6193 feat:modify inventory' (!2078) from 6193_inventory into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2078 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
28de7bd402
|
@ -30,10 +30,11 @@ BEGIN
|
||||||
ish.visible,
|
ish.visible,
|
||||||
p.sectorFk,
|
p.sectorFk,
|
||||||
it.workerFk buyer,
|
it.workerFk buyer,
|
||||||
CONCAT('http:',ic.url, '/catalog/1600x900/',i.image) urlImage,
|
ic.url,
|
||||||
|
i.image,
|
||||||
ish.isChecked,
|
ish.isChecked,
|
||||||
CASE
|
CASE
|
||||||
WHEN s.notPrepared > sm.parked THEN 0
|
WHEN IFNULL (s.notPrepared, 0) > sm.parked THEN 0
|
||||||
WHEN sm.visible > sm.parked THEN 1
|
WHEN sm.visible > sm.parked THEN 1
|
||||||
ELSE 2
|
ELSE 2
|
||||||
END priority
|
END priority
|
||||||
|
@ -43,7 +44,7 @@ BEGIN
|
||||||
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
|
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.code = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN (
|
LEFT JOIN (
|
||||||
SELECT s.itemFk, sum(s.quantity) notPrepared
|
SELECT s.itemFk, sum(s.quantity) notPrepared
|
||||||
FROM sale s
|
FROM sale s
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
JOIN ticket t ON t.id = s.ticketFk
|
||||||
|
|
Loading…
Reference in New Issue