24 lines
537 B
MySQL
24 lines
537 B
MySQL
|
|
||
|
DROP procedure IF EXISTS `vn`.`catalog_calcFromItem`;
|
||
|
DELIMITER $$
|
||
|
CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`catalog_calcFromItem`(
|
||
|
vLanded DATE,
|
||
|
vAddressFk INT,
|
||
|
vAgencyModeFk INT,
|
||
|
vItemFk INT)
|
||
|
BEGIN
|
||
|
/**
|
||
|
* Calculates available and price for a single item.
|
||
|
*
|
||
|
* @param vItemFk The item id
|
||
|
*/
|
||
|
DROP TEMPORARY TABLE IF EXISTS tmp.item;
|
||
|
CREATE TEMPORARY TABLE tmp.item
|
||
|
ENGINE = MEMORY
|
||
|
SELECT vItemFk itemFk;
|
||
|
|
||
|
CALL ticketCalculate(vLanded, vAddressFk, vAgencyModeFk);
|
||
|
DROP TEMPORARY TABLE tmp.item;
|
||
|
END$$
|
||
|
DELIMITER ;
|