8032-devToTest_2440 #3009
|
@ -266,14 +266,14 @@ proc: BEGIN
|
||||||
ADD hasPlantTray BOOL DEFAULT FALSE;
|
ADD hasPlantTray BOOL DEFAULT FALSE;
|
||||||
|
|
||||||
UPDATE tmp.productionBuffer pb
|
UPDATE tmp.productionBuffer pb
|
||||||
JOIN sale s ON s.ticketFk = pb.ticketFk
|
JOIN sale s ON s.ticketFk = pb.ticketFk
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
JOIN itemType it ON it.id = i.typeFk
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
JOIN cache.last_buy lb ON lb.warehouse_id = vWarehouseFk AND lb.item_id = s.itemFk
|
JOIN cache.last_buy lb ON lb.warehouse_id = vWarehouseFk AND lb.item_id = s.itemFk
|
||||||
JOIN buy b ON b.id = lb.buy_id
|
JOIN buy b ON b.id = lb.buy_id
|
||||||
JOIN packaging p ON p.id = b.packagingFk
|
JOIN packaging p ON p.id = b.packagingFk
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
SET hasPlantTray = TRUE
|
SET hasPlantTray = TRUE
|
||||||
WHERE ic.code = 'plant'
|
WHERE ic.code = 'plant'
|
||||||
AND p.`depth` >= pc.minPlantTrayLength;
|
AND p.`depth` >= pc.minPlantTrayLength;
|
||||||
|
|
Loading…
Reference in New Issue