fix(ticket_getMovable): refs #7225 stock add ifnull
This commit is contained in:
parent
0cd740ce0c
commit
eced03f69b
|
@ -38,7 +38,7 @@ BEGIN
|
|||
s.discount,
|
||||
i.image,
|
||||
i.subName,
|
||||
il.stock + IFNULL(im.amount, 0) AS movable
|
||||
IFNULL(il.stock,0) + IFNULL(im.amount, 0) AS movable
|
||||
FROM ticket t
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
|
|
Loading…
Reference in New Issue