private void CalculateTaxes(decimal value) { var bracket = FindApplicableTaxRate(value); decimal tax = CalculateTaxLiability(value, bracket); TaxReturns.Add(new TaxReturnViewModel(tax, value, bracket.MarginalTaxRate)); }
private void CalculateAllTaxes() { if (TaxReturns != null && TaxReturns.Count > 0) { TaxReturns.Clear(); } foreach (var earnings in Earnings) { CalculateTaxes(earnings); } }