DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `vn`.`ticket_componentMakeUpdate`(	
	vTicketFk INT,
    vClientFk INT,
	vAgencyModeFk INT,
	vAddressFk INT,
    vZoneFk INT,
	vWarehouseFk TINYINT,
    vCompanyFk SMALLINT,
	vShipped DATETIME,
	vLanded DATE,
    vIsDeleted BOOLEAN,
    vHasToBeUnrouted BOOLEAN,
	vOption INT)
BEGIN

	CALL vn.ticket_componentPreview (vTicketFk, vLanded, vAddressFk, vZoneFk, vWarehouseFk);
    CALL vn.ticket_componentUpdate (
		vTicketFk, 
        vClientFk,
        vAgencyModeFk, 
        vAddressFk, 
        vZoneFk,
		vWarehouseFk,
        vCompanyFk,
        vShipped, 
        vLanded, 
        vIsDeleted, 
        vHasToBeUnrouted,
        vOption
	);

    DROP TEMPORARY TABLE 
        tmp.ticketComponent,
		tmp.ticketComponentPrice;
END$$

DELIMITER ;
