feat: refs #6830 item_getLack origin #2025
|
@ -23,7 +23,8 @@ BEGIN
|
||||||
SUM(IFNULL(sub.amount,0)) lack,
|
SUM(IFNULL(sub.amount,0)) lack,
|
||||||
i.inkFk,
|
i.inkFk,
|
||||||
IFNULL(im.timed, util.midnight()) timed,
|
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,
|
FROM (SELECT item_id,
|
||||||
warehouse_id,
|
warehouse_id,
|
||||||
amount
|
amount
|
||||||
|
@ -42,6 +43,7 @@ BEGIN
|
||||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
LEFT JOIN tmp.itemMinETD im ON im.itemFk = i.id
|
LEFT JOIN tmp.itemMinETD im ON im.itemFk = i.id
|
||||||
LEFT JOIN tmp.itemZoneClosure izc ON izc.itemFk = i.id
|
LEFT JOIN tmp.itemZoneClosure izc ON izc.itemFk = i.id
|
||||||
|
JOIN origin o ON o.id = i.originFk
|
||||||
WHERE w.isForTicket
|
WHERE w.isForTicket
|
||||||
AND ic.display
|
AND ic.display
|
||||||
AND it.code != 'GEN'
|
AND it.code != 'GEN'
|
||||||
|
|
Loading…
Reference in New Issue