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