20 lines
427 B
MySQL
20 lines
427 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150))
|
||
|
BEGIN
|
||
|
|
||
|
/**
|
||
|
* Actualiza la referencia del item
|
||
|
*
|
||
|
* @param vBarcode del item
|
||
|
* @param vReference referencia a actualizar
|
||
|
*/
|
||
|
|
||
|
DECLARE vItemFk INT;
|
||
|
|
||
|
SELECT barcodeToItem(vBarcode) INTO vItemFk;
|
||
|
|
||
|
UPDATE item SET comment = vReference WHERE id = vItemFk;
|
||
|
|
||
|
END$$
|
||
|
DELIMITER ;
|