Ejemplo n.º 1
0
 public double TourPriceEstimate(TourPricingTypeEnum pricingType, double tourFee, int maximumPaxToGo, int passenger)
 {
     if (pricingType == TourPricingTypeEnum.FlatFee)
     {
         return(Math.Round(tourFee / passenger));
     }
     if (pricingType == TourPricingTypeEnum.BasePersion)
     {
         return(tourFee);
     }
     return(tourFee);
 }
Ejemplo n.º 2
0
        public double TourPriceEstimate(TourPricingTypeEnum pricingType, double tourFee, int maximumPaxToGo, int passenger = 0)
        {
            double result = 0;

            if (pricingType == TourPricingTypeEnum.FlatFee)
            {
                result = Math.Round(tourFee / passenger);
            }

            if (pricingType == TourPricingTypeEnum.BasePersion)
            {
                if (passenger < maximumPaxToGo)
                {
                    result = Math.Round(tourFee / passenger);
                }
                else if (passenger >= maximumPaxToGo)
                {
                    result = tourFee;
                }
            }

            return(result);
        }