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); }
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); }
public bool isApplicable(OrderEntry item) { return((item.Product.Origin.ToString() == ("IMPORT")) ? true : false); }