refactor: refs #7920 Main change #3194
|
@ -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
|
||||
)
|
||||
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 ;
|
||||
|
|
|
@ -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
jgallego
commented
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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
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
jgallego
commented
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
|
||||
JOIN shelving sh2 ON sh2.code = vShelvingO COLLATE utf8_unicode_ci
|
||||
SET ish.shelvingFk = sh1.id
|
||||
WHERE ish.shelvingFk = sh2.id;
|
||||
UPDATE itemShelving ish
|
||||
JOIN shelving sh1 ON sh1.code = vShelvingD COLLATE utf8_unicode_ci
|
||||
JOIN shelving sh2 ON sh2.code = vShelvingO COLLATE utf8_unicode_ci
|
||||
SET ish.shelvingFk = sh1.id
|
||||
WHERE ish.shelvingFk = sh2.id;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
Loading…
Reference in New Issue
int? o shelvingCode?
ShelvingCode, vuic fer-ho retrocompatible