refs #6574 feat: add order #2264
|
@ -155,27 +155,28 @@ BEGIN
|
||||||
SET @currentLineFk := 0;
|
SET @currentLineFk := 0;
|
||||||
SET @shipped := '';
|
SET @shipped := '';
|
||||||
|
|
||||||
SELECT DATE(@shipped:= shipped) shipped,
|
SELECT DATE(@shipped:= t.shipped) shipped,
|
||||||
jgallego marked this conversation as resolved
Outdated
|
|||||||
alertLevel,
|
t.alertLevel,
|
||||||
stateName,
|
t.stateName,
|
||||||
origin,
|
t.origin,
|
||||||
reference,
|
t.reference,
|
||||||
clientFk,
|
t.clientFk,
|
||||||
name,
|
t.name,
|
||||||
`in` invalue,
|
t.`in` invalue,
|
||||||
`out`,
|
t.`out`,
|
||||||
@a := @a + IFNULL(`in`, 0) - IFNULL(`out`, 0) balance,
|
@a := @a + IFNULL(t.`in`, 0) - IFNULL(t.`out`, 0) balance,
|
||||||
@currentLineFk := IF (@shipped < util.VN_CURDATE()
|
@currentLineFk := IF (@shipped < util.VN_CURDATE()
|
||||||
OR (@shipped = util.VN_CURDATE() AND (isPicked OR a.`code` >= 'ON_PREPARATION')),
|
OR (@shipped = util.VN_CURDATE() AND (t.isPicked OR a.`code` >= 'ON_PREPARATION')),
|
||||||
jgallego marked this conversation as resolved
Outdated
jgallego
commented
t.isPicked t.isPicked
sergiodt
commented
canviat canviat
|
|||||||
lineFk,
|
t.lineFk,
|
||||||
@currentLineFk) lastPreparedLineFk,
|
@currentLineFk) lastPreparedLineFk,
|
||||||
isTicket,
|
t.isTicket,
|
||||||
lineFk,
|
t.lineFk,
|
||||||
isPicked,
|
t.isPicked,
|
||||||
clientType,
|
t.clientType,
|
||||||
claimFk
|
t.claimFk,
|
||||||
FROM tItemDiary
|
t.`order`
|
||||||
sergiodt marked this conversation as resolved
Outdated
jgallego
commented
añadir alias añadir alias
sergiodt
commented
Afegit Afegit
|
|||||||
LEFT JOIN alertLevel a ON a.id = tItemDiary.alertLevel;
|
FROM tItemDiary t
|
||||||
|
LEFT JOIN alertLevel a ON a.id = t.alertLevel;
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
SELECT SUM(`in`) - SUM(`out`) INTO @a
|
SELECT SUM(`in`) - SUM(`out`) INTO @a
|
||||||
|
@ -197,7 +198,8 @@ BEGIN
|
||||||
0 lineFk,
|
0 lineFk,
|
||||||
0 isPicked,
|
0 isPicked,
|
||||||
0 clientType,
|
0 clientType,
|
||||||
0 claimFk
|
0 claimFk,
|
||||||
|
NULL `order`
|
||||||
sergiodt marked this conversation as resolved
Outdated
jgallego
commented
poner 0 poner 0
sergiodt
commented
Com hem vist li pose NULL Com hem vist li pose NULL
|
|||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT shipped,
|
SELECT shipped,
|
||||||
alertlevel,
|
alertlevel,
|
||||||
|
@ -213,7 +215,8 @@ BEGIN
|
||||||
lineFk,
|
lineFk,
|
||||||
isPicked,
|
isPicked,
|
||||||
clientType,
|
clientType,
|
||||||
claimFk
|
claimFk,
|
||||||
|
`order`
|
||||||
FROM tItemDiary
|
FROM tItemDiary
|
||||||
WHERE shipped >= vDate;
|
WHERE shipped >= vDate;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
Loading…
Reference in New Issue
t.shipped
canviat