Merge branch 'dev' into 6607_checking_boxes
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-03-06 16:03:24 +00:00
commit dc6cfafd05
1 changed files with 4 additions and 3 deletions

View File

@ -30,10 +30,11 @@ BEGIN
ish.visible,
p.sectorFk,
it.workerFk buyer,
CONCAT('http:',ic.url, '/catalog/1600x900/',i.image) urlImage,
ic.url,
i.image,
ish.isChecked,
CASE
WHEN s.notPrepared > sm.parked THEN 0
WHEN IFNULL (s.notPrepared, 0) > sm.parked THEN 0
WHEN sm.visible > sm.parked THEN 1
ELSE 2
END priority
@ -43,7 +44,7 @@ BEGIN
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
JOIN shelving sh ON sh.code = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN (
LEFT JOIN (
SELECT s.itemFk, sum(s.quantity) notPrepared
FROM sale s
JOIN ticket t ON t.id = s.ticketFk