modified fixed structure
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ee8ce8f0de
commit
7e5fcc73ad
|
@ -59970,7 +59970,7 @@ BEGIN
|
|||
SELECT DATE(t.shipped),
|
||||
NULL,
|
||||
s.quantity,
|
||||
al.id,
|
||||
al3.id,
|
||||
st.name,
|
||||
t.nickname,
|
||||
t.refFk,
|
||||
|
@ -59988,12 +59988,14 @@ BEGIN
|
|||
LEFT JOIN state st ON st.code = ts.code
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
JOIN clientType ct ON ct.id = c.clientTypeFk
|
||||
JOIN alertLevel al ON al.code =
|
||||
CASE
|
||||
WHEN t.shipped < util.VN_CURDATE() THEN 'DELIVERED'
|
||||
WHEN t.shipped > util.dayEnd(util.VN_CURDATE()) THEN 'FREE'
|
||||
ELSE IFNULL(ts.alertLevel, 0)
|
||||
END
|
||||
JOIN alertLevel al ON al.code = 'DELIVERED'
|
||||
JOIN alertLevel al2 ON al2.code = 'FREE'
|
||||
JOIN alertLevel al3 ON al3.id =
|
||||
CASE
|
||||
WHEN t.shipped < util.VN_CURDATE() THEN al.code
|
||||
WHEN t.shipped > util.dayEnd(util.VN_CURDATE()) THEN al2.code
|
||||
ELSE IFNULL(ts.alertLevel, al2.code)
|
||||
END
|
||||
LEFT JOIN state stPrep ON stPrep.`code` = 'PREPARED'
|
||||
LEFT JOIN saleTracking stk ON stk.saleFk = s.id AND stk.stateFk = stPrep.id
|
||||
LEFT JOIN claimBeginning cb ON s.id = cb.saleFk
|
||||
|
|
Loading…
Reference in New Issue