19 lines
372 B
MySQL
19 lines
372 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`order_checkEditable`(vSelf INT)
|
||
|
BEGIN
|
||
|
/**
|
||
|
* Cheks if order is editable.
|
||
|
*
|
||
|
* @param vSelf The order id
|
||
|
*/
|
||
|
DECLARE vIsConfirmed BOOL;
|
||
|
|
||
|
SELECT confirmed INTO vIsConfirmed
|
||
|
FROM `order` WHERE id = vSelf;
|
||
|
|
||
|
IF vIsConfirmed THEN
|
||
|
CALL util.throw('orderConfirmed');
|
||
|
END IF;
|
||
|
END$$
|
||
|
DELIMITER ;
|