2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`catalog_calcFromItem`(
|
2024-01-15 11:31:03 +00:00
|
|
|
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;
|
|
|
|
|
2024-03-25 13:56:12 +00:00
|
|
|
CALL catalog_calculate(vLanded, vAddressFk, vAgencyModeFk, TRUE);
|
2024-01-15 11:31:03 +00:00
|
|
|
DROP TEMPORARY TABLE tmp.item;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|