salix/db/routines/hedera/procedures/myOrder_getTax.sql

22 lines
457 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myOrder_getTax`(vSelf INT)
READS SQL DATA
BEGIN
/**
* Returns the taxes for the current client order.
*
* @treturn tmp.orderTax
*/
CALL myOrder_checkMine(vSelf);
DROP TEMPORARY TABLE IF EXISTS tmp.`order`;
CREATE TEMPORARY TABLE tmp.`order`
ENGINE = MEMORY
SELECT vSelf orderFk;
CALL order_getTax();
DROP TEMPORARY TABLE IF EXISTS tmp.`order`;
END$$
DELIMITER ;