refs #6574 feat: add order
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Sergio De la torre 2024-04-08 11:35:10 +02:00
parent 957b0c71ca
commit 42b033dde2
1 changed files with 19 additions and 19 deletions

View File

@ -156,27 +156,27 @@ BEGIN
SET @shipped := '';
SELECT DATE(@shipped:= shipped) shipped,
alertLevel,
stateName,
origin,
reference,
clientFk,
name,
`in` invalue,
`out`,
@a := @a + IFNULL(`in`, 0) - IFNULL(`out`, 0) balance,
t.alertLevel,
t.stateName,
t.origin,
t.reference,
t.clientFk,
t.name,
t.`in` invalue,
t.`out`,
@a := @a + IFNULL(t.`in`, 0) - IFNULL(t.`out`, 0) balance,
@currentLineFk := IF (@shipped < util.VN_CURDATE()
OR (@shipped = util.VN_CURDATE() AND (isPicked OR a.`code` >= 'ON_PREPARATION')),
lineFk,
t.lineFk,
@currentLineFk) lastPreparedLineFk,
isTicket,
lineFk,
isPicked,
clientType,
claimFk,
`order`
FROM tItemDiary
LEFT JOIN alertLevel a ON a.id = tItemDiary.alertLevel;
t.isTicket,
t.lineFk,
t.isPicked,
t.clientType,
t.claimFk,
t.`order`
FROM tItemDiary t
LEFT JOIN alertLevel a ON a.id = t.alertLevel;
ELSE
SELECT SUM(`in`) - SUM(`out`) INTO @a
@ -199,7 +199,7 @@ BEGIN
0 isPicked,
0 clientType,
0 claimFk,
`order`
NULL `order`
UNION ALL
SELECT shipped,
alertlevel,