feat: refs#6493 Cambios solicitados procedimientos
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
351d5b5ba3
commit
1534402640
|
@ -75,9 +75,9 @@ proc: BEGIN
|
|||
(INDEX (itemFk,warehouseFk))
|
||||
ENGINE = MEMORY
|
||||
SELECT i.itemFk,
|
||||
vWarehouseLanding warehouseFk,
|
||||
i.shipped dated,
|
||||
i.quantity
|
||||
vWarehouseLanding warehouseFk,
|
||||
i.shipped dated,
|
||||
i.quantity
|
||||
FROM itemTicketOut i
|
||||
JOIN tItemRangeLive ir ON ir.itemFK = i.itemFk
|
||||
WHERE i.shipped >= vDatedFrom
|
||||
|
@ -85,9 +85,9 @@ proc: BEGIN
|
|||
AND i.warehouseFk = vWarehouseLanding
|
||||
UNION ALL
|
||||
SELECT b.itemFk,
|
||||
vWarehouseLanding,
|
||||
t.landed,
|
||||
b.quantity
|
||||
vWarehouseLanding,
|
||||
t.landed,
|
||||
b.quantity
|
||||
FROM buy b
|
||||
JOIN entry e ON b.entryFk = e.id
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
|
|
|
@ -206,7 +206,8 @@ BEGIN
|
|||
SUM(b2.', vTwoYearsAgo,') twoYearsAgo
|
||||
FROM tmp.nest b1
|
||||
JOIN tmp.balance_aux b2 on b2.lft BETWEEN b1.lft and b1.rgt
|
||||
GROUP BY b1.id)sub ON sub.id = b.id
|
||||
GROUP BY b1.id
|
||||
)sub ON sub.id = b.id
|
||||
SET b.', vYear, ' = thisYear,
|
||||
b.', vOneYearAgo, ' = oneYearAgo,
|
||||
b.', vTwoYearsAgo, ' = twoYearsAgo');
|
||||
|
|
Loading…
Reference in New Issue