コード例 #1
0
 public ProductCatalog(string productName, Money price, bool isTaxable, bool isImported)
 {
     this._productName = productName;
     this._price = price;
     this._isImported = isImported;
     this._isTaxable = isTaxable;
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
ファイル: OrderLine.cs プロジェクト: sonyarouje/DDDTracer
 internal void SetTaxAmount(Money taxAmt)
 {
     _taxAmt = taxAmt;
 }