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