8032-devToTest_2440 #3009
|
@ -75,6 +75,9 @@ proc: BEGIN
|
||||||
WHERE saleFk = vSaleFk;
|
WHERE saleFk = vSaleFk;
|
||||||
|
|
||||||
IF vTotalReservedQuantity <> vSaleQuantity THEN
|
IF vTotalReservedQuantity <> vSaleQuantity THEN
|
||||||
|
CALL util.debugAdd('itemShelvingSale_addBySale',
|
||||||
|
CONCAT(vSaleFk, ' - ', vSaleQuantity,' - ', vTotalReservedQuantity,'-', vOutStanding,'-', account.myUser_getId()));
|
||||||
|
|
||||||
UPDATE sale
|
UPDATE sale
|
||||||
SET quantity = vTotalReservedQuantity
|
SET quantity = vTotalReservedQuantity
|
||||||
WHERE id = vSaleFk;
|
WHERE id = vSaleFk;
|
||||||
|
@ -93,7 +96,8 @@ proc: BEGIN
|
||||||
SET vOutStanding = vOutStanding - vReservedQuantity;
|
SET vOutStanding = vOutStanding - vReservedQuantity;
|
||||||
|
|
||||||
IF vReservedQuantity > 0 THEN
|
IF vReservedQuantity > 0 THEN
|
||||||
|
CALL util.debugAdd('itemShelvingSale_addBySale_reservedQuantity',
|
||||||
|
CONCAT(vSaleFk, ' - ', vReservedQuantity, ' - ', vOutStanding, account.myUser_getId()));
|
||||||
INSERT INTO itemShelvingSale(
|
INSERT INTO itemShelvingSale(
|
||||||
itemShelvingFk,
|
itemShelvingFk,
|
||||||
saleFk,
|
saleFk,
|
||||||
|
|
|
@ -276,7 +276,8 @@ proc: BEGIN
|
||||||
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
|
||||||
|
AND pb.isOwn;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
DROP TEMPORARY TABLE
|
||||||
tmp.productionTicket,
|
tmp.productionTicket,
|
||||||
|
|
|
@ -10,6 +10,7 @@ BEGIN
|
||||||
*
|
*
|
||||||
* @param vSelf Id ticket
|
* @param vSelf Id ticket
|
||||||
* @param vOriginalItemPackingTypeFk Tipo empaquetado al que se mantiene el ticket original
|
* @param vOriginalItemPackingTypeFk Tipo empaquetado al que se mantiene el ticket original
|
||||||
|
* @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
*/
|
*/
|
||||||
DECLARE vDone INT DEFAULT FALSE;
|
DECLARE vDone INT DEFAULT FALSE;
|
||||||
DECLARE vHasItemPackingType BOOL;
|
DECLARE vHasItemPackingType BOOL;
|
||||||
|
@ -73,5 +74,13 @@ BEGIN
|
||||||
WHERE stm.ticketFk;
|
WHERE stm.ticketFk;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tSalesToMove;
|
DROP TEMPORARY TABLE tSalesToMove;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
|
||||||
|
ticketFk INT,
|
||||||
|
itemPackingTypeFk VARCHAR(1)
|
||||||
|
) ENGINE=MEMORY;
|
||||||
|
SELECT ticketFk, itemPackingTypeFk
|
||||||
|
FROM tSalesToMove
|
||||||
|
GROUP BY ticketFk;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -1,3 +1,2 @@
|
||||||
-- Place your SQL code here
|
ALTER TABLE vn.productionConfig ADD IF NOT EXISTS minPlantTrayLength INT DEFAULT 53 NOT NULL
|
||||||
ALTER TABLE vn.productionConfig ADD minPlantTrayLength INT DEFAULT 53 NOT NULL
|
|
||||||
COMMENT 'minimum length for plant tray restriction. Avoid to make collection of the ticket with this kind of item';
|
COMMENT 'minimum length for plant tray restriction. Avoid to make collection of the ticket with this kind of item';
|
||||||
|
|
Loading…
Reference in New Issue