public static decimal GetPrice(Flight flight, Tax tax) { if (tax.Price != 0) return tax.Price; return flight.BasePrice*(tax.Percentage/100); }
public static Tax ToTripTax(RouteTax routeTax, Flight flight) { var tax = new Tax(); tax.ID = routeTax.IdNumber; tax.ChangeType = routeTax.Tax.ChargeType.Name; tax.Code = routeTax.Tax.Code; tax.Country = routeTax.Route.DepartureAirport.City.Country.ISOCode; tax.SalePrice = PriceHelper.CreatePrice(TaxHelper.GetPrice(flight, routeTax.Tax)); return tax; }
public InDirectFlight(Flight flight) { Flights = new List<Flight> {flight}; }
public IEnumerable<RouteTax> GetRouteTaxes(Flight flight) { return flight.Route.RouteTaxes; }