diff --git a/db/install/changes/13-itemLog.sql b/db/install/changes/13-itemLog.sql deleted file mode 100644 index 43a1fcca2..000000000 --- a/db/install/changes/13-itemLog.sql +++ /dev/null @@ -1,4 +0,0 @@ -USE `vn`; - -ALTER TABLE vn.itemLog MODIFY COLUMN userFk int(10) unsigned NULL; -ALTER TABLE vn.itemLog MODIFY COLUMN id int(11) NOT NULL AUTO_INCREMENT; \ No newline at end of file diff --git a/db/install/changes/14-basketGetTax.sql b/db/install/changes/14-basketGetTax.sql new file mode 100644 index 000000000..f74623275 --- /dev/null +++ b/db/install/changes/14-basketGetTax.sql @@ -0,0 +1,21 @@ +DROP procedure IF EXISTS `hedera`.`basketGetTax`; +DELIMITER $$ +CREATE DEFINER=`root`@`%` PROCEDURE `hedera`.`basketGetTax`() + READS SQL DATA +BEGIN +/** + * Returns the taxes for the current client basket. + * + * @treturn tmp.orderTax + */ + DROP TEMPORARY TABLE IF EXISTS tmp.order; + CREATE TEMPORARY TABLE tmp.order + ENGINE = MEMORY + SELECT myBasketGetId() orderFk; + + CALL orderGetTax(); + + DROP TEMPORARY TABLE IF EXISTS tmp.order; +END$$ + +DELIMITER ;