예제 #1
0
        public decimal PriceWithAdjustments()
        {
            var result = BasePrice;

            result += DiscountDetails.Sum(y => y.Amount);
            return(result);
        }
예제 #2
0
        /// <summary>
        ///     Total of all discounts
        /// </summary>
        /// <returns>Decimal</returns>
        public decimal TotalDiscounts()
        {
            if (DiscountDetails == null || DiscountDetails.Count < 1)
            {
                return(0);
            }

            return(IsFreeItem
                ? DiscountDetails.Where(s => s.DiscountType == PromotionType.OfferForFreeItems).Sum(y => y.Amount)
                : DiscountDetails.Sum(y => y.Amount));
        }