18 lines
354 B
MySQL
18 lines
354 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`supplier_checkIsActive`(vSelf INT)
|
||
|
BEGIN
|
||
|
/**
|
||
|
* Comprueba si un proveedor esta activo.
|
||
|
*/
|
||
|
DECLARE vIsActive BOOL;
|
||
|
|
||
|
SELECT isActive INTO vIsActive
|
||
|
FROM vn.supplier
|
||
|
WHERE id = vSelf;
|
||
|
|
||
|
IF NOT vIsActive THEN
|
||
|
CALL util.throw('INACTIVE_PROVIDER');
|
||
|
END IF;
|
||
|
END$$
|
||
|
DELIMITER ;
|