refactor: refs #7920 Requested changes
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-11-14 09:59:01 +01:00
parent 5a134668da
commit d387486ea8
4 changed files with 19 additions and 16 deletions

View File

@ -1,12 +1,12 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(
vShelvingFk VARCHAR(10)
vShelvingCode VARCHAR(10)
)
BEGIN
/**
* Devuelve el log de los item en cada carro
*
* @param vShelvingFk Matrícula del carro
* @param vShelvingCode Matrícula del carro
*
*/
SELECT isl.itemShelvingFk,
@ -29,8 +29,8 @@ BEGIN
JOIN itemShelvingLog isl ON item.id = isl.itemFk
JOIN worker ON isl.workerFk = worker.id
JOIN shelving sh ON sh.id = isl.shelvingFk
WHERE sh.code = vShelvingFk COLLATE utf8mb3_unicode_ci
OR isl.itemFk = vShelvingFk -- ?? Respeto porque ya estaba
WHERE sh.code = vShelvingCode COLLATE utf8mb3_unicode_ci
OR isl.itemFk = vShelvingCode -- ?? Respeto porque ya estaba
ORDER BY isl.created DESC;
END$$
DELIMITER ;

View File

@ -1,7 +1,7 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_devalueA2`(
vSelf INT,
vShelvingCode VARCHAR(10),
vShelvingCode VARCHAR(10) COLLATE utf8mb3_general_ci,
vBuyingValue DECIMAL(10,4),
vQuantity INT
)
@ -112,7 +112,7 @@ BEGIN
SELECT ish.id, ish.visible INTO vTargetItemShelvingFk, vCurrentVisible
FROM itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
WHERE sh.code = vShelvingCode COLLATE utf8mb3_general_ci
WHERE sh.code = vShelvingCode
AND ish.itemFk = vSelf
LIMIT 1;
@ -399,7 +399,7 @@ BEGIN
FROM itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
WHERE ish.itemFK = vSelf
AND sh.code = vShelvingCode COLLATE utf8mb3_general_ci
AND sh.code = vShelvingCode
ON DUPLICATE KEY UPDATE
visible = vQuantity + VALUES(visible);

View File

@ -27,7 +27,7 @@ BEGIN
DECLARE vQuantity INT;
DECLARE vRemainder INT DEFAULT 0;
DECLARE vRemainderSaleFk INT;
DECLARE vShelving VARCHAR(10);
DECLARE vShelvingFk VARCHAR(10);
DECLARE vTicketFk INT;
SELECT s.quantity,
@ -262,7 +262,7 @@ w1: WHILE vQuantity >= vPacking DO
CALL dipole.expedition_Add(vExpeditionFk,vPrinterFk, TRUE);
SELECT shelvingFk, p.code
INTO vShelving, vParkingCode
INTO vShelvingFk, vParkingCode
FROM itemShelving ish
JOIN shelving sh ON sh.id = ish.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
@ -273,7 +273,7 @@ w1: WHILE vQuantity >= vPacking DO
itemFk = vItemFk,
quantity = vPacking,
longName = vConcept,
shelvingFk = vShelving,
shelvingFk = vShelvingFk,
parkingCode = vParkingCode,
phone = RIGHT(phone,vMaxPhoneLength),
street = RIGHT(street, vMAxStreetLength)

View File

@ -1,5 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8))
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(
`vShelvingO` VARCHAR(10),
`vShelvingD` VARCHAR(10)
)
BEGIN
UPDATE itemShelving ish
JOIN shelving sh1 ON sh1.code = vShelvingD COLLATE utf8_unicode_ci