salix/db/routines/vn/procedures/item_saveReference.sql

20 lines
425 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
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 ;