7167-testToMaster_2414 #2244

Merged
alexm merged 643 commits from 7167-testToMaster_2414 into master 2024-04-04 05:32:41 +00:00
3 changed files with 6 additions and 7 deletions
Showing only changes of commit 0867f4d501 - Show all commits

View File

@ -4,8 +4,7 @@ BEGIN
DECLARE vNewTicketFk INT; DECLARE vNewTicketFk INT;
CALL ticket_CloneAll(vTicketFk, vNewShipped, TRUE, vNewTicketFk); CALL ticket_cloneAll(vTicketFk, vNewShipped, TRUE, vNewTicketFk);
SELECT vNewTicketFk;
END$$ END$$
DELIMITER ; DELIMITER ;

View File

@ -1,8 +1,8 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_CloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_cloneAll`(vTicketFk INT, vNewShipped DATE, vWithWarehouse BOOLEAN, OUT vNewTicketFk INT)
BEGIN BEGIN
DECLARE done INT DEFAULT FALSE; DECLARE vDone BOOLEAN DEFAULT FALSE;
DECLARE vOldSaleFk INT; DECLARE vOldSaleFk INT;
DECLARE vNewSaleFk INT; DECLARE vNewSaleFk INT;
@ -11,7 +11,7 @@ BEGIN
FROM sale FROM sale
WHERE ticketFk = vTicketFk; WHERE ticketFk = vTicketFk;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
SET vNewShipped = IFNULL(vNewShipped, util.VN_CURDATE()); SET vNewShipped = IFNULL(vNewShipped, util.VN_CURDATE());
@ -29,7 +29,7 @@ BEGIN
FETCH cur1 INTO vOldSaleFk; FETCH cur1 INTO vOldSaleFk;
IF done THEN IF vDone THEN
LEAVE read_loop; LEAVE read_loop;
END IF; END IF;

View File

@ -40,7 +40,7 @@ module.exports = Self => {
try { try {
const [, [{clonedTicketId}]] = await Self.rawSql(` const [, [{clonedTicketId}]] = await Self.rawSql(`
CALL vn.ticket_CloneAll(?, ?, ?, @clonedTicketId); CALL vn.ticket_cloneAll(?, ?, ?, @clonedTicketId);
SELECT @clonedTicketId clonedTicketId;`, SELECT @clonedTicketId clonedTicketId;`,
[id, shipped, withWarehouse], myOptions); [id, shipped, withWarehouse], myOptions);