Merge pull request 'feat: refs #6830 item_getLack origin' (!2025) from 6830-item_getLackOrigin into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2025
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
This commit is contained in:
Ivan Mas 2024-02-13 13:14:02 +00:00
commit 11bbab6288
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,8 @@ BEGIN
SUM(IFNULL(sub.amount,0)) lack,
i.inkFk,
IFNULL(im.timed, util.midnight()) timed,
IFNULL(izc.timed, util.midnight()) minTimed
IFNULL(izc.timed, util.midnight()) minTimed,
o.name originFk
FROM (SELECT item_id,
warehouse_id,
amount
@ -42,6 +43,7 @@ BEGIN
JOIN itemCategory ic ON ic.id = it.categoryFk
LEFT JOIN tmp.itemMinETD im ON im.itemFk = i.id
LEFT JOIN tmp.itemZoneClosure izc ON izc.itemFk = i.id
JOIN origin o ON o.id = i.originFk
WHERE w.isForTicket
AND ic.display
AND it.code != 'GEN'