8032-devToTest_2440 #3009

Merged
alexm merged 262 commits from 8032-devToTest_2440 into test 2024-09-24 09:34:49 +00:00
4 changed files with 17 additions and 4 deletions
Showing only changes of commit cabc9660d6 - Show all commits

View File

@ -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,

View File

@ -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,

View File

@ -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 ;

View File

@ -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';