This commit is contained in:
parent
1cbba0b52f
commit
8f9a7802ab
|
@ -268,15 +268,12 @@ proc: BEGIN
|
|||
UPDATE tmp.productionBuffer pb
|
||||
JOIN sale s ON s.ticketFk = pb.ticketFk
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
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 packaging p ON p.id = b.packagingFk
|
||||
JOIN productionConfig pc
|
||||
SET hasPlantTray = TRUE
|
||||
WHERE ic.code = 'plant'
|
||||
AND p.`depth` >= pc.minPlantTrayLength
|
||||
SET pb.hasPlantTray = TRUE
|
||||
WHERE p.isPlantTray
|
||||
AND pb.isOwn;
|
||||
|
||||
DROP TEMPORARY TABLE
|
||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitItemPacki
|
|||
vSelf INT,
|
||||
vOriginalItemPackingTypeFk VARCHAR(1)
|
||||
)
|
||||
BEGIN
|
||||
proc: BEGIN
|
||||
/**
|
||||
* Clona y reparte las líneas de ventas de un ticket en funcion del tipo de empaquetado.
|
||||
* Respeta el id de ticket inicial para el tipo de empaquetado propuesto.
|
||||
|
@ -31,7 +31,7 @@ BEGIN
|
|||
AND i.itemPackingTypeFk = vOriginalItemPackingTypeFk;
|
||||
|
||||
IF NOT vHasItemPackingType THEN
|
||||
CALL util.throw('The ticket has not sales with the itemPackingType');
|
||||
LEAVE proc;
|
||||
END IF;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tSalesToMove (
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.packaging ADD IF NOT EXISTS isPlantTray BOOL DEFAULT FALSE NOT NULL
|
||||
COMMENT 'The container is a plant tray. Used to restrict the picking of full plant trays, to make previous picking.';
|
Loading…
Reference in New Issue