-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtax.html
13 lines (12 loc) · 6.93 KB
/
tax.html
1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- <%@ language="javascript"%> -->
<!DOCTYPE html>
<html lang="en-150">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8"><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.3.1/sandstone/bootstrap.min.css" media="all"><link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <!--google icons--><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.cs s"> <!--font awesome 20px-sm--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script><script>
$(document).ready(function(){
$('#myTab li:eq(1) a').tab('show');
});
</script><script>function totalTAX(){var e=parseFloat(document.getElementById("brut").value),l=parseFloat(document.getElementById("pension").value),n=.6*l,t=l-n,_=e+n;if(level_19>=_)var v=_-0,r=0,m=0,d=0,a=0,i=0,o=.19*v,u=0,g=0,c=0,y=0,B=0;else if(_>level_19&&level_24>=_)var v=level_19,r=_-level_19,m=0,d=0,a=0,i=0,o=.19*v,u=.24*r,g=0,c=0,y=0,B=0;else if(_>level_24&&level_30>=_)var v=level_19,r=level_24-level_19,m=_-level_24,d=0,a=0,i=0,o=.19*v,u=.24*r,g=.3*m,c=0,y=0,B=0;else if(_>level_30&&level_37>=_)var v=level_19,r=level_24-level_19,m=level_30-level_24,d=_-level_30,a=0,i=0,o=.19*v,u=.24*r,g=.3*m,c=.37*d,y=0,B=0;else if(_>level_37&&level_45>=_)var v=level_19,r=level_24-level_19,m=level_30-level_24,d=level_37-level_30,a=_-level_37,i=0,o=.19*v,u=.24*r,g=.3*m,c=.37*d,y=.45*a,B=0;else if(_>level_45)var v=level_19,r=level_24-level_19,m=level_30-level_24,d=level_37-level_30,a=level_45-level_37,i=_-level_45,o=.19*v,u=.24*r,g=.3*m,c=.37*d,y=.45*a,B=.47*i;var E=_-o-u-g-c-y-B+(l-n),I=E.toFixed(2),T=100-I/(e+l)*100,H=T.toFixed(1);document.getElementById("net").innerHTML=" = "+I+"€",document.getElementById("brut_span").innerHTML=_+"€",document.getElementById("tramo_0a12450").innerHTML=v+"€",document.getElementById("tramo_12450a20200").innerHTML=r+"€",document.getElementById("tramo_20200a35200").innerHTML=m+"€",document.getElementById("tramo_35200a60000").innerHTML=d+"€",document.getElementById("tramo_60000a300000").innerHTML=a+"€",document.getElementById("tramo_mas300000").innerHTML=i+"€",document.getElementById("irpf_19").innerHTML=" = "+o+"€",document.getElementById("irpf_24").innerHTML=" = "+u+"€",document.getElementById("irpf_30").innerHTML=" = "+g+"€",document.getElementById("irpf_37").innerHTML=" = "+c+"€",document.getElementById("irpf_45").innerHTML=" = "+y+"€",document.getElementById("irpf_47").innerHTML=" = "+B+"€",document.getElementById("untaxed_pension").innerHTML=t+"€",document.getElementById("average_tax").innerHTML=H+"%"}var level_19=12450,level_24=20200,level_30=35200,level_37=6e4,level_45=3e5;$(".progress-bar").animate({width:"70%"},2500);</script> <style>
.btn-primary{background-color:#066}.btn-primary:hover{background-color:#004d4d}.text-primary{color:#066!important}.input-lg{font-size:30px}.input{font-size:20px}.font-sm{font-size:.7em}.nav-tabs>li>a{color:#84a5ae}.btn-danger:hover{border-radius:20px;background-color:#b62f2f;color:#48586a}@media print{.noPrint{display:none}}.progress{height:40px}.progress-bar .bg-info{background-color:#48586a}.progress-label{float:left;margin-left:1em;margin-right:1em}</style>
<title>Tax calculator</title></head><body><div id="intro" class="container-fluid"><div class="row"><div class="col-sm-12 col-md-12 text-center"><h1> Tax calculator <i class="fas fa-briefcase fa-fw"></i></h1><h4> A simple tool to (approximately) calculate net income and average tax rates. </h4><hr></div></div></div><div id="miTAX" class="container-fluid" onclick="totalTAX()"><div class="row"><div class="col-sm-12 col-md-6 text-center"><div class="btn btn-primary btn-lg btn-block" ><div class="card-body"><div class="form-group "><div class="input-group"><div class="input-group-addon"><span class="glyphicon glyphicon-calendar aria-hidden='true'">Taxable earnings (€) </span> </div><input class="form-control input-sm" type="number" id="brut" name="bruto" value="30000" min="0" max="1000000" step="10"></div></div><div class="form-group "><div class="input-group"><div class="input-group-addon"><span class="glyphicon glyphicon-calendar aria-hidden='true'">Pension withdrawal (€) </span> </div><input class="form-control input-sm" type="number" id="pension" name="pensionplan" value="50000" min="0" max="1000000" step="100"></div></div></div></div><br></div><div class="col-sm-12 col-md-6 text-center" ><div id="results" class="container-fluid"><div class="row"><div class="col-sm-12 col-md-12 text-center"><div class="card text-white bg-warning mb-3"><div class="card-body"><h1> <i class="fas fa-briefcase fa-fw"></i> Net amount <span id="net"> </span> <span id=""> </span></h1></div></div></div></div></div></div></div><div class="row"><div class="col-sm-12 col-md-12"><div class="card" ><div class="card-body"><h3>Tax debriefing: </h3><h5>From the taxable amount of <span id="brut_span"> 0</span>: </h5><ul>- <span id="tramo_0a12450"> 0€</span> will fall into the 0-12450 tier, with a 19% tax <span id="irpf_19"> </span>.</ul> <ul>- <span id="tramo_12450a20200"> 0€</span> will fall into the 12450-20200 tier, with a 24% tax <span id="irpf_24"> </span>.</ul> <ul>- <span id="tramo_20200a35200"> 0€</span> will fall into the 20200-35200 tier, with a 30% tax <span id="irpf_30"> </span>.</ul> <ul>- <span id="tramo_35200a60000"> 0€</span> will fall into the 35200-60000 tier, with a 37% tax <span id="irpf_37"> </span>.</ul> <ul>- <span id="tramo_60000a300000"> 0€</span> will fall into the 60000-300000 tier, with a 45% tax <span id="irpf_45"> </span>.</ul> <ul>- <span id="tramo_mas300000"> 0€</span> will fall into the >3000000 tier, with a 47% tax <span id="irpf_47"> </span>.</ul> <ul>- <span id="untaxed_pension"> 0€</span> (40%) from the pension plan are exempt from taxes.</ul> <ul> <span id=""> </span> </ul> <h5>The average tax rate will be <span id="average_tax"> </span> </h5></div></div></div></div></div><div id="contact" class="container-fluid"><div class="row"><div class="col-sm-12 col-md-12 text-center"><div class="card-body"><h4> Contact</h4><p><span class="fa fa-user-md"></span> Aurora Baluja-González,</p><p><span class="glyphicon glyphicon-map-marker"></span> Santiago de Compostela<sup></sup>, España</p><p><h3> </h3> </p></div></div></div></div><div id="license" class="container-fluid"><div class="row"><div class="col-sm-12 col-md-12"><h3> </h3><hr><p style="color:#bfbfbf"><span class="fa fa-user-md" style="color:#bfbfbf"></span> Author: A. Baluja, 2021. License - <a href="https://github.com/aurora-mareviv" target="blank" style="color:#bfbfbf">Code</a>: GNU-GPL v3. <a href="http://getbootstrap.com/" target="blank" style="color:#bfbfbf">Bootstrap CSS</a>, <a href="https://bootswatch.com/" target="blank" style="color:#bfbfbf">Bootswatch</a>: MIT.</p></div></div></div></body></html>