feat: refs #7564 Requested changes
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
7fc47f0506
commit
8a03650eca
|
@ -3,13 +3,13 @@ CREATE OR REPLACE TEMPORARY TABLE tTicketVolume
|
||||||
(PRIMARY KEY (id))
|
(PRIMARY KEY (id))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume
|
SELECT t.id, SUM(s.quantity * ic.cm3delivery / 1000000) volume
|
||||||
FROM sale s
|
FROM vn.sale s
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||||
JOIN itemCost ic ON ic.itemFk = s.itemFk
|
JOIN vn.itemCost ic ON ic.itemFk = s.itemFk
|
||||||
AND ic.warehouseFk = t.warehouseFk
|
AND ic.warehouseFk = t.warehouseFk
|
||||||
GROUP BY t.id;
|
GROUP BY t.id;
|
||||||
|
|
||||||
UPDATE ticket t
|
UPDATE vn.ticket t
|
||||||
JOIN tTicketVolume tv ON tv.id = t.id
|
JOIN tTicketVolume tv ON tv.id = t.id
|
||||||
SET t.volume = tv.volume;
|
SET t.volume = tv.volume;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue