7152-devToTest_2414 #2228
|
@ -39,11 +39,11 @@ BEGIN
|
||||||
WHERE t.landed BETWEEN vStarted AND vEnded
|
WHERE t.landed BETWEEN vStarted AND vEnded
|
||||||
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
AND (vWarehouseFk IS NULL OR t.warehouseInFk = vWarehouseFk)
|
||||||
AND b.price2 > 0
|
AND b.price2 > 0
|
||||||
AND b.quantity > 0
|
|
||||||
ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC
|
ORDER BY NOT b.isIgnored DESC, t.landed DESC, b.id DESC
|
||||||
LIMIT 10000000000000000000) sub
|
LIMIT 10000000000000000000) sub
|
||||||
GROUP BY itemFk, warehouseFk;
|
GROUP BY itemFk, warehouseFk;
|
||||||
|
|
||||||
|
|
||||||
INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored)
|
INSERT IGNORE INTO tmp.buyUltimateFromInterval(itemFk, warehouseFk, buyFk, landed, isIgnored)
|
||||||
SELECT
|
SELECT
|
||||||
b.itemFk,
|
b.itemFk,
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
ALTER TABLE vn.department
|
||||||
|
ADD COLUMN pbxQueue varchar(128) CHARACTER
|
||||||
|
SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.department
|
||||||
|
ADD CONSTRAINT department_queue_FK
|
||||||
|
FOREIGN KEY (pbxQueue) REFERENCES pbx.queue(name) ON DELETE RESTRICT ON UPDATE CASCADE;
|
Loading…
Reference in New Issue