Merge pull request 'fix: hotfix entry_splitByShelving' (!3252) from HotfixEntry_splitByShelving into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #3252 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
ee2b5471e4
|
@ -23,12 +23,13 @@ BEGIN
|
||||||
LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers,
|
LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers,
|
||||||
bb.stickers buyStickers
|
bb.stickers buyStickers
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN (SELECT b.id, b.itemFk, b.stickers
|
JOIN (SELECT b.id, b.itemFk, b.stickers
|
||||||
FROM buy b
|
FROM buy b
|
||||||
WHERE b.entryFk = vFromEntryFk
|
WHERE b.entryFk = vFromEntryFk
|
||||||
ORDER BY b.stickers DESC
|
ORDER BY b.stickers DESC
|
||||||
LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk
|
LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk
|
||||||
WHERE ish.shelvingFk = vShelvingCode COLLATE utf8_general_ci
|
WHERE sh.code = vShelvingCode COLLATE utf8_general_ci
|
||||||
AND NOT ish.isSplit
|
AND NOT ish.isSplit
|
||||||
GROUP BY ish.id;
|
GROUP BY ish.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue