示例#1
0
        public void addItem(Product product, int qty)
        {
            Money      totalTaxes = new Money(0.00, TaxSrvc.CurrencyCode);
            OrderEntry item       = new OrderEntry(product, qty, totalTaxes);

            totalTaxes      = TaxSrvc.getAllTaxes(item);
            item.TotalTaxes = totalTaxes;

            OrderItems.Add(item);
        }
示例#2
0
        public Money getAllTaxes(OrderEntry item)
        {
            Money totalTax = item.TotalTaxes;

            foreach (TaxMethod taxMethod in TaxMethods)
            {
                if (taxMethod.TaxApplicableCheck.isApplicable(item))
                {
                    totalTax = totalTax + (TaxCalculator.calculateTax((item.Product.Price * item.Qty), taxMethod.TaxRatePrcnt));
                }
            }

            return(totalTax);
        }
 public bool isApplicable(OrderEntry item)
 {
     return((item.Product.Category.Taxable == true) ? true : false);
 }
示例#4
0
 public bool isApplicable(OrderEntry item)
 {
     return((item.Product.Origin.ToString() == ("IMPORT")) ?  true :  false);
 }