27 lines
660 B
SQL
27 lines
660 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` 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
|
|
* @return tmp.ticketCalculateItem
|
|
* @return tmp.ticketComponentPrice
|
|
* @return tmp.ticketComponent
|
|
* @return tmp.ticketLot
|
|
* @return tmp.zoneGetShipped
|
|
*/
|
|
DROP TEMPORARY TABLE IF EXISTS tmp.item;
|
|
CREATE TEMPORARY TABLE tmp.item
|
|
ENGINE = MEMORY
|
|
SELECT vItemFk itemFk;
|
|
|
|
CALL catalog_calculate(vLanded, vAddressFk, vAgencyModeFk);
|
|
DROP TEMPORARY TABLE tmp.item;
|
|
END$$
|
|
DELIMITER ;
|