Пример #1
0
        public override Price GetTotal(IOrderItemContext item)
        {
            var   regularPrice   = base.GetTotal(item);
            Price volumeDiscount = 0;

            if (item.GetUnits() >= _volumeThreshold)
            {
                volumeDiscount = _volumeThreshold * item.GetUnitPrice() - _volumePrice;
            }

            return(regularPrice - volumeDiscount);
        }
Пример #2
0
 public virtual Price GetTotal(IOrderItemContext item)
 {
     return(item.GetUnits() * item.GetUnitPrice());
 }