This commit is contained in:
parent
31530d6d3d
commit
186cd4c7dd
|
@ -114,9 +114,8 @@ BEGIN
|
||||||
cb.claimFk
|
cb.claimFk
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||||
LEFT JOIN vn.ticketLastState tls ON tls.ticketFk = t.id
|
LEFT JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
||||||
LEFT JOIN vn.ticketTracking tt ON tt.id = tls.ticketTrackingFk
|
LEFT JOIN vn.state st ON st.code = ts.code
|
||||||
LEFT JOIN vn.state st ON st.id = tt.stateFk
|
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
JOIN vn.client c ON c.id = t.clientFk
|
||||||
JOIN vn.state st2 ON st2.`code` = IF(t.shipped < util.VN_CURDATE(),
|
JOIN vn.state st2 ON st2.`code` = IF(t.shipped < util.VN_CURDATE(),
|
||||||
'DELIVERED',
|
'DELIVERED',
|
||||||
|
|
Loading…
Reference in New Issue