20 lines
425 B
SQL
20 lines
425 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`vn`@`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 ;
|