refactor: refs #7920 Main change #3194

Merged
guillermo merged 9 commits from 7920-itemShelving into dev 2024-11-15 06:44:17 +00:00
4 changed files with 19 additions and 16 deletions
Showing only changes of commit d387486ea8 - Show all commits

View File

@ -1,12 +1,12 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(
vShelvingFk VARCHAR(10)
vShelvingCode VARCHAR(10)
guillermo marked this conversation as resolved Outdated

int? o shelvingCode?

int? o shelvingCode?

ShelvingCode, vuic fer-ho retrocompatible

ShelvingCode, vuic fer-ho retrocompatible
)
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
guillermo marked this conversation as resolved Outdated

si el poses dalt en la definicio no cal que el poses dos vegades en el codi

si el poses dalt en la definicio no cal que el poses dos vegades en el codi
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`(
guillermo marked this conversation as resolved Outdated

la taula es varchar10, revisals tots per si de cas

la taula es varchar10, revisals tots per si de cas
`vShelvingO` VARCHAR(10),
`vShelvingD` VARCHAR(10)
)
BEGIN
UPDATE itemShelving ish
JOIN shelving sh1 ON sh1.code = vShelvingD COLLATE utf8_unicode_ci