Ejemplo n.º 1
0
        public static decimal CapitalGainsTaxFor(FilingStatus status, decimal gain, decimal income)
        {
            income -= GetStandardDeduction(filingStatus: status, jurisdiction: "Federal");
            var bracket = TaxBrackets.CapitalGainsBracketFor(status, income);
            var rate    = TaxBrackets.CapitalGainsRateForBracket[bracket];

            return(gain * rate);
        }
Ejemplo n.º 2
0
        public TaxBrackets GetTaxBrackets(int serviceYrs)
        {
            var user       = UserManager.Users.Where(x => x.UserName == User.Identity.Name).FirstOrDefault();
            var schemeName = PensionSetup.GetSchemeNameAsync(user.SponsorNumber);
            TaxBrackets_Service brackets_Service = new TaxBrackets_Service();

            brackets_Service.Url = "http://" + PensionSetup.ServerName + ":" + PensionSetup.ServerPort + "/" + PensionSetup.ServerInstance + "/WS/" + schemeName + "/Page/TaxBrackets";

            brackets_Service.UseDefaultCredentials = false;
            brackets_Service.Credentials           = new NetworkCredential(SoapUser, SoapPass);
            TaxBrackets[] taxes = brackets_Service.ReadMultiple(null, null, 0);

            TaxBrackets taxBrackets = taxes.Where(x => x.Minimum_Service_Years == serviceYrs).FirstOrDefault();

            return(taxBrackets);
        }
Ejemplo n.º 3
0
 public IEnumerator <TaxBracket> GetEnumerator()
 {
     return(TaxBrackets.GetEnumerator());
 }