예제 #1
0
        public decimal getDiscountedPersonCost(decimal yearlyCost, IPerson person)
        {
            var discountedCost = yearlyCost;

            var discounts = _discountHelper.GetApplicableDiscounts();

            discounts.ForEach(d =>
            {
                discountedCost = discountedCost - d.GetDiscountAmount(yearlyCost, person);
            });

            return(discountedCost);
        }