public ActionResult IncomeTaxInformation(TaxInformation taxInformation)
 {
     if (Session["Admin"] != null)
     {
         var pannumber = Request["PanNumber"].ToString();
         if (pannumber != "")
         {
             var data = db.Registrations.Where(m => m.PanNumber.Equals(pannumber)).FirstOrDefault();
             if (data == null)
             {
                 var taxInformations = db.TaxInformations.Include(t => t.Registration);
                 return(View(taxInformations.ToList()));
             }
             else
             {
                 var uid             = data.Uid;
                 var taxInformations = db.TaxInformations.Where(m => m.Uid.Equals(uid)).Include(t => t.Registration);
                 return(View(taxInformations.ToList()));
             }
         }
         else
         {
             var taxInformations = db.TaxInformations.Include(t => t.Registration);
             return(View(taxInformations.ToList()));
         }
     }
     else
     {
         return(RedirectToAction("Index", "AdminInformations"));
     }
 }
 public Boolean UpdateTaxAmount([FromBody] Home home)
 {
     DBConnect objDB = new DBConnect();
     string sqlCommand = "SELECT * FROM TaxInformation WHERE HomeOwnershipID = '" + home.HomeOwnershipID + "'";
     DataSet ds = objDB.GetDataSet(sqlCommand);
     TaxInformation taxInformation = new TaxInformation();
     DataRow record;
     if (ds.Tables[0].Rows.Count != 0)
     {
         record = ds.Tables[0].Rows[0];
         taxInformation.TaxInformationID = Convert.ToInt32(record["TaxInformationID"].ToString());
         taxInformation.HomeOwnershipID = Convert.ToInt32(record["HomeOwnershipID"].ToString());
         taxInformation.AccessedValue = Convert.ToDecimal(record["AccessedValue"].ToString());
         taxInformation.AdditionalValue = Convert.ToDecimal(record["AdditionalValue"].ToString());
         taxInformation.LandValue = Convert.ToDecimal(record["LandValue"].ToString());
         taxInformation.TaxAmount = Convert.ToDecimal(record["TaxAmount"].ToString());
         taxInformation.TaxRate = Convert.ToDecimal(record["TaxRate"].ToString());
     }
     decimal taxAmount = (taxInformation.AccessedValue + taxInformation.AdditionalValue + taxInformation.LandValue) * taxInformation.TaxRate;
     taxInformation.TaxAmount = taxAmount;
     objDB = new DBConnect();
     sqlCommand = "UPDATE TaxInformation SET TaxAmount = '" + taxInformation.TaxAmount + "'";
     if(objDB.DoUpdate(sqlCommand) > 0)
     {
         return true;
     }
     return false;
 }
        public async Task<bool> StoreNewTaxInformationAsync(int EmployeeId, TaxInformation TaxInformation)
        {
            TaxInformation.EmployeeId = EmployeeId;

            _context.TaxInformations.Add(TaxInformation);
            return (await _context.SaveChangesAsync()) > 0;
        }
        public List<Home> GetHomeandTaxInformationByOwnerName(string ownerName)
        {

            DBConnect objDB = new DBConnect();
            string sqlCommand = "SELECT * FROM HomeOwnership JOIN TaxInformation ON HomeOwnerShip.HomeOwnershipID = TaxInformation.HomeOwnershipID JOIN Owner ON HomeOwnerShip.OwnerID = Owner.OwnerID WHERE OwnerName = '" + ownerName + "'";
            DataSet ds = objDB.GetDataSet(sqlCommand);
            List<Home> homes = new List<Home>();
            Home home;
            TaxInformation taxInformation = new TaxInformation();
            foreach (DataRow record in ds.Tables[0].Rows)
            {
                home = new Home();
                taxInformation = new TaxInformation();
                home.HomeOwnershipID = Convert.ToInt32(record["HomeOwnershipID"].ToString());
                home.OwnerID = Convert.ToInt32(record["OwnerID"].ToString());
                home.Address = record["Address"].ToString();
                home.Lot = Convert.ToInt32(record["Lot"].ToString());
                home.Block = Convert.ToInt32(record["Block"].ToString());
                home.DateOfSale = Convert.ToDateTime(record["DateOfSale"].ToString());
                home.SalePrice = Convert.ToDecimal(record["SalePrice"].ToString());
                home.TaxInformation = taxInformation;
                home.TaxInformation.TaxInformationID = Convert.ToInt32(record["TaxInformationID"].ToString());
                home.TaxInformation.HomeOwnershipID = Convert.ToInt32(record["HomeOwnershipID"].ToString());
                home.TaxInformation.AccessedValue = Convert.ToDecimal(record["AccessedValue"].ToString());
                home.TaxInformation.AdditionalValue = Convert.ToDecimal(record["AdditionalValue"].ToString());
                home.TaxInformation.LandValue = Convert.ToDecimal(record["LandValue"].ToString());
                home.TaxInformation.TaxAmount = Convert.ToDecimal(record["TaxAmount"].ToString());
                home.TaxInformation.TaxRate = Convert.ToDecimal(record["TaxRate"].ToString());
                homes.Add(home);
            }
            return homes;
        }
Exemplo n.º 5
0
        private void OnAddNewTaxInformation()
        {
            TaxInformation info = new TaxInformation();

            info.InvestorId = Investor.Id;
            TaxInformation.Add(info);
        }
        public ActionResult DeleteConfirmed(int id)
        {
            TaxInformation taxInformation = db.TaxInformations.Find(id);

            db.TaxInformations.Remove(taxInformation);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Tid,Uid,Year,Status,TotalIncome,TotalTax")] TaxInformation taxInformation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(taxInformation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Uid = new SelectList(db.Registrations, "Uid", "FirstName", taxInformation.Uid);
     return(View(taxInformation));
 }
        // GET: TaxInformations/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TaxInformation taxInformation = db.TaxInformations.Find(id);

            if (taxInformation == null)
            {
                return(HttpNotFound());
            }
            return(View(taxInformation));
        }
        // GET: TaxInformations/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TaxInformation taxInformation = db.TaxInformations.Find(id);

            if (taxInformation == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Uid = new SelectList(db.Registrations, "Uid", "FirstName", taxInformation.Uid);
            return(View(taxInformation));
        }
Exemplo n.º 10
0
        private void UpdateTaxInformationsForInvestor(Investor investor)
        {
            using (HqTrustData dbContext = new HqTrustData())
            {
                var existingTax = dbContext.TaxInformations.Where(b => b.InvestorId == investor.Id).ToList();

                // foreach account in existingAccounts try to find a record in investor.BankAccounts
                // if found --> update properties
                // if not found --> record was deleted by user --> remove account

                foreach (TaxInformation document in existingTax)
                {
                    TaxInformation newDoc = investor.TaxInformations.FirstOrDefault(b => b.Id == document.Id);
                    if (newDoc == null)
                    {
                        // not found --> remove
                        dbContext.TaxInformations.Remove(document);
                    }
                    else
                    {
                        // found --> update properties
                        document.CountryId = newDoc.CountryId;
                        document.Remarks   = newDoc.Remarks;
                        document.TaxIdentificationNumber = newDoc.TaxIdentificationNumber;
                        document.TaxStatus = newDoc.TaxStatus;
                    }
                }


                foreach (TaxInformation document in investor.TaxInformations)
                {
                    if (document.Id != 0)
                    {
                        continue;
                    }
                    document.InvestorId = investor.Id;
                    dbContext.TaxInformations.Add(document);
                }
                try
                {
                    dbContext.SaveChanges();
                }
                catch (Exception ex)
                {
                    throw new Exception($"Fehler beim Einfügen eines neuen Investors (Tabelle: TaxInformations) Fehler: {ex.InnerException.Message}");
                }
            }
        }
 public ActionResult History(TaxInformation tax)
 {
     if (Session["PanNumber"] != null)
     {
         ViewBag.m = Session["PanNumber"].ToString();
         using (TaxSystemEntities1 db = new TaxSystemEntities1())
         {
             var x    = Convert.ToInt32(Session["Uid"]);
             var data = db.TaxInformations.Where(m => m.Uid.Equals(x)).ToList();
             return(View(data));
         }
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
Exemplo n.º 12
0
        protected override OpResult _Store(TaxInformation _obj)
        {
            if (_obj == null)
            {
                return(OpResult.NotifyStoreAction(OpResult.ResultStatus.ObjectIsNull, _obj, "TaxInformation object cannot be created as it is null"));
            }

            if (Exists(_obj))
            {
                ExecuteNonQuery(GetQuery_UpdateQuery(_obj));
                return(OpResult.NotifyStoreAction(OpResult.ResultStatus.Updated, _obj));
            }

            ExecuteNonQuery(GetQuery_InsertQuery(_obj));
            _obj.FromDb = true;
            return(OpResult.NotifyStoreAction(OpResult.ResultStatus.Created, _obj));
        }
 public TaxInformation GetTaxInformationByAddress(string address)
 {
     DBConnect objDB = new DBConnect();
     string sqlCommand = "SELECT * FROM TaxInformation JOIN HomeOwnership ON TaxInformation.HomeOwnershipID = HomeOwnership.HomeOwnershipID WHERE Address = '" + address + "'";
     DataSet ds = objDB.GetDataSet(sqlCommand);
     DataRow record;
     TaxInformation taxInformation = new TaxInformation();
     if (ds.Tables[0].Rows.Count != 0)
     {
         record = ds.Tables[0].Rows[0];
         taxInformation.TaxInformationID = Convert.ToInt32(record["TaxInformationID"].ToString());
         taxInformation.HomeOwnershipID = Convert.ToInt32(record["HomeOwnershipID"].ToString());
         taxInformation.AccessedValue = Convert.ToDecimal(record["AccessedValue"].ToString());
         taxInformation.AdditionalValue = Convert.ToDecimal(record["AdditionalValue"].ToString());
         taxInformation.LandValue = Convert.ToDecimal(record["LandValue"].ToString());
         taxInformation.TaxAmount = Convert.ToDecimal(record["TaxAmount"].ToString());
         taxInformation.TaxRate = Convert.ToDecimal(record["TaxRate"].ToString());
     }
     return taxInformation;
 }
Exemplo n.º 14
0
        private DbInsertStatement GetQuery_InsertQuery(TaxInformation _obj)
        {
            Dictionary <string, DbFieldEntry> fields = GetFields(_obj);

            return(DbMgr.CreateInsertClause("TaxInformation", fields));
        }
Exemplo n.º 15
0
 private DbUpdateStatement GetQuery_UpdateQuery(TaxInformation _obj)
 {
     return(DbMgr.CreateUpdateClause("TaxInformation", GetFields(_obj), "TaxInformationID", _obj.TaxInformationID));
 }
 public async Task<bool> DeleteTaxInformation(TaxInformation TaxInformation)
 {
     _context.Remove(TaxInformation);
     return (await _context.SaveChangesAsync()) > 0;
 }
        public async Task<bool> UpdateTaxInformationAsync(int EmployeeId, TaxInformation TaxInformation)
        {
            TaxInformation.EmployeeId = EmployeeId;

            return (await _context.SaveChangesAsync()) > 0;
        }
Exemplo n.º 18
0
        public ActionResult ComputeTax(TaxInformation taxinfo)
        {
            string year = Request["year"].ToString();
            string tptext = Request["tptext"].ToString();
            string stext = Request["statustext"].ToString();
            string status = tptext + " || " + stext;
            int    taxpayer = Convert.ToInt32(Request["taxpayer"].ToString());
            int    statusnum = Convert.ToInt32(Request["status"].ToString());
            int    taxableincome = Convert.ToInt32(Request["taxableincome"].ToString());
            int    arincometax = 0, surcharge = 0, educationcess = 0, totaltax = 0;

            if (taxpayer <= 1)
            {
                if (statusnum <= 1)
                {
                    if (taxableincome <= 250000)
                    {
                        arincometax   = 0;
                        surcharge     = 0;
                        educationcess = 0;
                        totaltax      = 0;
                    }
                    else if (taxableincome <= 500000)
                    {
                        arincometax = (taxableincome - 250000) * 5 / 100;
                        if (taxableincome <= 350000)
                        {
                            if (arincometax <= 2500)
                            {
                                arincometax = 0;
                            }
                            else
                            {
                                arincometax = arincometax - 2500;
                            }
                        }
                        surcharge = 0;
                    }
                    else if (taxableincome <= 1000000)
                    {
                        arincometax = 12500 + (taxableincome - 500000) * 20 / 100;
                        surcharge   = 0;
                    }
                    else
                    {
                        arincometax = 112500 + (taxableincome - 1000000) * 30 / 100;
                        if (taxableincome <= 10000000 && taxableincome > 5000000)
                        {
                            surcharge = arincometax / 10;
                        }
                        else
                        {
                            surcharge = arincometax * 15 / 100;
                        }
                    }
                    educationcess = arincometax * 4 / 100;
                    totaltax      = arincometax + surcharge + educationcess;
                }
                else if (statusnum == 2)
                {
                    if (taxableincome <= 300000)
                    {
                        arincometax   = 0;
                        surcharge     = 0;
                        educationcess = 0;
                        totaltax      = 0;
                    }
                    else if (taxableincome <= 500000)
                    {
                        arincometax = (taxableincome - 300000) * 5 / 100;
                        if (taxableincome <= 350000)
                        {
                            if (arincometax <= 2500)
                            {
                                arincometax = 0;
                            }
                            else
                            {
                                arincometax = arincometax - 2500;
                            }
                        }
                        surcharge = 0;
                    }
                    else if (taxableincome <= 1000000)
                    {
                        arincometax = 10000 + (taxableincome - 500000) * 20 / 100;
                        surcharge   = 0;
                    }
                    else
                    {
                        arincometax = 110000 + (taxableincome - 1000000) * 30 / 100;
                        if (taxableincome <= 10000000 && taxableincome > 5000000)
                        {
                            surcharge = arincometax / 10;
                        }
                        else
                        {
                            surcharge = arincometax * 15 / 100;
                        }
                    }
                    educationcess = arincometax * 4 / 100;
                    totaltax      = arincometax + surcharge + educationcess;
                }
                else
                {
                    if (taxableincome <= 500000)
                    {
                        arincometax   = 0;
                        surcharge     = 0;
                        educationcess = 0;
                        totaltax      = 0;
                    }
                    else if (taxableincome <= 1000000)
                    {
                        arincometax = (taxableincome - 500000) * 20 / 100;
                        surcharge   = 0;
                    }
                    else
                    {
                        arincometax = 100000 + (taxableincome - 1000000) * 30 / 100;
                        if (taxableincome <= 10000000 && taxableincome > 5000000)
                        {
                            surcharge = arincometax / 10;
                        }
                        else
                        {
                            surcharge = arincometax * 15 / 100;
                        }
                    }
                    educationcess = arincometax * 4 / 100;
                    totaltax      = arincometax + surcharge + educationcess;
                }
            }
            else
            {
                if (taxableincome <= 10000)
                {
                    arincometax = (taxableincome - 0) * 10 / 100;
                    surcharge   = 0;
                }
                else if (taxableincome <= 20000)
                {
                    arincometax = (taxableincome - 10000) * 20 / 100;
                    surcharge   = 0;
                }
                else
                {
                    arincometax = (taxableincome - 20000) * 30 / 100;
                    surcharge   = 0;
                }
                educationcess = arincometax * 4 / 100;
                totaltax      = arincometax + surcharge + educationcess;
            }
            if (totaltax <= 250000)
            {
                using (TaxSystemEntities1 db = new TaxSystemEntities1())
                {
                    if (ModelState.IsValid)
                    {
                        taxinfo.TotalIncome = taxableincome;
                        taxinfo.Status      = status;
                        taxinfo.TotalTax    = totaltax;
                        taxinfo.Year        = year;
                        taxinfo.Uid         = Convert.ToInt32(Session["Uid"]);
                        db.TaxInformations.Add(taxinfo);
                        db.SaveChanges();
                    }
                }
            }
            ViewBag.arincometax   = arincometax;
            ViewBag.taxableincome = taxableincome;
            ViewBag.surcharge     = surcharge;
            ViewBag.educationcess = educationcess;
            ViewBag.totaltax      = totaltax;
            ModelState.Clear();
            return(View("Index"));
        }
Exemplo n.º 19
0
        public static ClientOrder GetSampleOrder()
        {
            ClientOrder client_order = new ClientOrder();

            ReportConfig report_config = new ReportConfig();

            report_config.disclaimer   = "We have made every effort to ensure the accuracy of this tax information.  However, due to the frequency with which municipalities revise their fees and other specifications, we cannot assume liability for any discrepancy in the taxes.  In the event that tax amounts have changed, please notify us so we can update our records.  Possible revenue bond charges for sewer and water pursuant to state statutes and local ordinances when connection to the system is made by the owner.  The exact current and continuing charges depend on all the facts.  Contact local officials for details.  This report is based on best available information at the time.  This is for informational purposes only and will not appear on title policy.\r\nPatent Pending ";
            client_order.report_config = report_config;

            ClientConfig client_config = new ClientConfig();

            client_config.base_path    = @"D:\Programming\0_crap\";
            client_config.report_name  = "Tax_Research.xlsx";
            client_config.logo         = @"D:\Programming\0_crap\logo.jpg";
            client_order.client_config = client_config;

            ParcelInformation parcel = new ParcelInformation();

            parcel.client_po_number   = "U NTN-ARS-12345";
            parcel.researcher         = "erice";
            parcel.owner_1            = "Buddy Rice";
            parcel.owner_2            = "Ashley Gonzalez";
            parcel.address            = "427 8th Ave N";
            parcel.city               = "Saint Petersburg";
            parcel.state              = "FL";
            parcel.zip_code           = "33701";
            parcel.county             = "PINELLAS";
            parcel.searched_address   = "427 8th Ave N";
            parcel.searched_city      = "Saint Petersburg";
            parcel.searched_state     = "FL";
            parcel.searched_zip_code  = "33701";
            parcel.assessed_owner_1   = "Buddy Rice";
            parcel.assessed_owner_2   = "Ashley Gonzalez";
            parcel.parcel_number      = "18-31-17-77814-001-0060";
            parcel.effective_date     = DateTime.Parse("2018-05-01");
            parcel.legal_desc         = "SAFFORD'S ADD REVISED BLK 1, E 75FT OF LOTS 6 AND 7";
            parcel.class_code         = "Apartments (10 units to 49 units)";
            parcel.assessed_valuation = 408980.00M;

            TaxAuthorityPaymentRecord payment_record = new TaxAuthorityPaymentRecord();

            payment_record.tax_type        = "County";
            payment_record.additional_data = "";
            payment_record.research_notes  = "";
            payment_record.lump_sum        = 1;
            payment_record.ex_homestead    = 0;
            payment_record.ex_disabled     = 0;
            payment_record.ex_veteran      = 1;
            payment_record.ex_mortgage     = 0;
            payment_record.ex_star         = 0;
            payment_record.ex_elderly      = 0;
            payment_record.ex_other        = string.Empty;
            payment_record.assessed_value  = 408980.00M;
            payment_record.land_value      = 225600.00M;
            payment_record.improved_value  = 45100.00M;
            payment_record.unincorporated  = 0;
            payment_record.lawsuit         = string.Empty;
            payment_record.lawsuit_case    = string.Empty;

            TaxAuthority tax_authority = new TaxAuthority();

            tax_authority.name               = "Pinellas County Tax Collector";
            tax_authority.payment_name       = "Pinellas County Tax Collector";
            tax_authority.current_tax_year   = "2018";
            tax_authority.discounts          = "N/A";
            tax_authority.duplicate_bill_fee = 5.00M;
            tax_authority.fiscal_year        = "2018";
            tax_authority.payment_address_1  = "1800 66th Street North";
            tax_authority.payment_address_2  = "suite ABC";
            tax_authority.payment_city       = "St.Petersburg";
            tax_authority.payment_state      = "FL";
            tax_authority.payment_zip        = "33710";
            tax_authority.payment_phone      = "(727)123-4567";
            tax_authority.payment_ext        = "9876";
            tax_authority.schedule           = "Annually";
            tax_authority.ta_other_notes     = "Pinellas County is the only taxing authority for this property.\n\nPinellas County collects annually due by 7/15 with an option to pay in installments due by 7/15, 10/15, 1/15 & 4/15.\n\nThere is a 10 day grace period for installment 1 only.\n\nPINELLAS COUNTY DOES NOT PROVIDE PAID DATES; PAYMENTS ARE PROCESSED AS PAID TIMELY BY THE DUE DATE.";
            payment_record.tax_authority     = tax_authority;

            TaxInformation tax_info = new TaxInformation();

            tax_info.jurisdiction_name = "Pinellas County Tax Collector";
            tax_info.jurisdiction_type = "County";
            tax_info.tax_rate          = 0.00M;
            tax_info.exemptions        = "Veterine Exemption";
            tax_info.milage_rate       = 22.0150M;
            tax_info.milage_next_due   = DateTime.Parse("2018-12-01");

            PaymentInstallment install_1 = new PaymentInstallment();

            install_1.amount_due        = 0.00M;
            install_1.paid              = 2459.89M;
            install_1.base_amount       = 2459.89M;
            install_1.date_due          = DateTime.Parse("2017-12-31");
            install_1.date_good_thru    = DateTime.Parse("2018-02-28");
            install_1.date_paid         = DateTime.Parse("2018-02-01");
            install_1.delinquent_amount = 0.00M;
            install_1.install           = 1;
            install_1.is_delinquent     = 0;
            install_1.is_estimate       = 0;
            install_1.is_exempt         = 0;
            install_1.is_partial        = 0;
            install_1.one_month         = 0.00M;
            install_1.two_month         = 0.00M;
            payment_record.installments.Add(install_1);

            PaymentInstallment install_2 = new PaymentInstallment();

            install_2.amount_due        = 0.00M;
            install_2.paid              = 2459.89M;
            install_2.base_amount       = 2459.89M;
            install_2.date_due          = DateTime.Parse("2017-12-31");
            install_2.date_good_thru    = DateTime.Parse("2018-02-01");
            install_2.date_paid         = DateTime.Parse("2018-02-01");
            install_2.delinquent_amount = 0.00M;
            install_2.install           = 2;
            install_2.is_delinquent     = 0;
            install_2.is_estimate       = 0;
            install_2.is_exempt         = 0;
            install_2.is_partial        = 0;
            install_2.one_month         = 0.00M;
            install_2.two_month         = 0.00M;
            payment_record.installments.Add(install_2);

            PaymentInstallment install_3 = new PaymentInstallment();

            install_3.amount_due        = 0.00M;
            install_3.paid              = 2459.89M;
            install_3.base_amount       = 2459.89M;
            install_3.date_due          = DateTime.Parse("2017-12-31");
            install_3.date_good_thru    = DateTime.Parse("2018-02-01");
            install_3.date_paid         = DateTime.Parse("2018-02-01");
            install_3.delinquent_amount = 0.00M;
            install_3.install           = 3;
            install_3.is_delinquent     = 0;
            install_3.is_estimate       = 0;
            install_3.is_exempt         = 0;
            install_3.is_partial        = 0;
            install_3.one_month         = 0.00M;
            install_3.two_month         = 0.00M;
            payment_record.installments.Add(install_3);

            PaymentInstallment install_4 = new PaymentInstallment();

            install_4.amount_due        = 2459.89M;
            install_4.base_amount       = 2459.89M;
            install_4.date_due          = DateTime.Parse("2017-12-31");
            install_4.date_good_thru    = DateTime.Parse("2018-02-01");
            install_4.date_paid         = DateTime.MinValue;
            install_4.delinquent_amount = 0.00M;
            install_4.install           = 4;
            install_4.is_delinquent     = 1;
            install_4.is_estimate       = 0;
            install_4.is_exempt         = 0;
            install_4.is_partial        = 0;
            install_4.one_month         = 0.00M;
            install_4.two_month         = 0.00M;
            payment_record.installments.Add(install_4);

            payment_record.tax_information = tax_info;
            parcel.payment_records.Add(payment_record);
            client_order.Parcels.Add(parcel);

            return(client_order);
        }