7199-devToTest_2316 #2287

Merged
alexm merged 169 commits from 7199-devToTest_2316 into test 2024-04-11 06:25:23 +00:00
2 changed files with 12 additions and 7 deletions
Showing only changes of commit 7aeb9e4f32 - Show all commits

View File

@ -1,12 +1,12 @@
DELIMITER $$ DELIMITER $$
$$ $$
CREATE OR REPLACE PROCEDURE vn.sale_boxPickingPrint( CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE vn.sale_boxPickingPrint(
IN vPrinterFk INT, IN vPrinterFk INT,
IN vSaleFk INT, IN vSaleFk INT,
IN vPacking INT, IN vPacking INT,
IN vSectorFk INT, IN vSectorFk INT,
IN vUserFk INT, IN vUserFk INT,
IN vPackagingFk INT, IN vPackagingFk VARCHAR(10),
IN vPackingSiteFk INT) IN vPackingSiteFk INT)
BEGIN BEGIN
/** Splits a line of sale to a different ticket and prints the transport sticker /** Splits a line of sale to a different ticket and prints the transport sticker
@ -61,6 +61,8 @@ BEGIN
w1: WHILE vQuantity >= vPacking DO w1: WHILE vQuantity >= vPacking DO
SET vQuantity = vQuantity - vPacking;
SET vItemShelvingFk = NULL; SET vItemShelvingFk = NULL;
SELECT sub.id SELECT sub.id
@ -209,6 +211,7 @@ w1: WHILE vQuantity >= vPacking DO
UPDATE itemShelvingSale UPDATE itemShelvingSale
SET saleFk = vNewSaleFk SET saleFk = vNewSaleFk
WHERE id = vItemShelvingSaleFk; WHERE id = vItemShelvingSaleFk;
END IF; END IF;
INSERT IGNORE INTO saleTracking(saleFk, isChecked, workerFk, stateFk) INSERT IGNORE INTO saleTracking(saleFk, isChecked, workerFk, stateFk)
@ -235,7 +238,7 @@ w1: WHILE vQuantity >= vPacking DO
) )
SELECT vAgencyModeFk, SELECT vAgencyModeFk,
vNewTicketFk, vNewTicketFk,
i.id, pc.defaultFreightItemFk,
vUserFk, vUserFk,
vPackagingFk, vPackagingFk,
ps.code, ps.code,
@ -246,9 +249,8 @@ w1: WHILE vQuantity >= vPacking DO
NOW() NOW()
FROM packingSite ps FROM packingSite ps
JOIN host h ON h.id = ps.hostFk JOIN host h ON h.id = ps.hostFk
JOIN item i ON i.name = 'Shipping cost' JOIN productionConfig pc
WHERE ps.id = vPackingSiteFk WHERE ps.id = vPackingSiteFk;
LIMIT 1;
SET vExpeditionFk = LAST_INSERT_ID(); SET vExpeditionFk = LAST_INSERT_ID();
@ -277,6 +279,7 @@ w1: WHILE vQuantity >= vPacking DO
DELETE FROM sale DELETE FROM sale
WHERE quantity = 0 WHERE quantity = 0
AND id = vSaleFk; AND id = vSaleFk;
END WHILE; END WHILE;
END$$ END$$

View File

@ -0,0 +1,2 @@
-- Place your SQL code here
ALTER TABLE vn.productionConfig ADD defaultFreightItemFk INT UNSIGNED DEFAULT 71 NOT NULL COMMENT 'Default value for expedition table';