Exemplo n.º 1
0
        public decimal GetTotalPrice()
        {
            decimal total = 0;

            foreach (var item in _scannedItem)
            {
                var sku          = item.Key;
                int scannedTimes = item.Value;
                total += _discount.GetDiscountedPrice(sku, ref scannedTimes);
                total += scannedTimes * _catalog.GetProductPrice(item.Key);
            }
            return(total);
        }