public Money CalculateTax(OrderLine orderLine)
        {
            if (_salesTax == null)
                CreateTaxInstance();

            return _salesTax.GetTax(orderLine);
        }
Beispiel #2
0
 public Order With(OrderLine orderLine)
 {
     Money tax = _salesCalculator.CalculateTax(orderLine);
     orderLine.SetTaxAmount(tax);
     orderLine.SetOrder(this);
     _lineItems.Add(orderLine);
     return this;
 }
        public Money GetTax(OrderLine orderLine)
        {
            Money tax = Money.Empty();
            if (_nextTaxRule != null)
                tax += _nextTaxRule.GetTax(orderLine);

            return tax;
        }
        public Money GetTax(OrderLine orderLine)
        {
            Money tax = Money.Empty();
            if(orderLine.TaxSpecification.IsTaxable())
                tax = new Money((orderLine.GetCost().Value * TAX_AMT) / 100);
            if(_nextTaxRule!=null)
                tax=tax + _nextTaxRule.GetTax(orderLine);

            return tax;
        }
        public Money GetTax(OrderLine orderLine)
        {
            Money tax = Money.Empty();
            if (orderLine.TaxSpecification.IsImported())
                tax = new Money((orderLine.GetCost().Value * 5) / 100);

            if (_nextTaxRule != null)
                tax += _nextTaxRule.GetTax(orderLine);

            return tax;
        }
 public TaxSpecification(OrderLine lineItem)
 {
     this._lineItem = lineItem;
 }