-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
216 lines (213 loc) · 7.39 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Calculadora de Rendimento Bruto e Líquido Equivalente</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
/>
<link
href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
/>
<link
href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Raleway:wght@400;700&family=Nunito:wght@400;700&family=Muli:wght@400;700&family=Ubuntu:wght@400;700&display=swap"
rel="stylesheet"
/>
<!-- Custom stlylesheet -->
<link type="text/css" rel="stylesheet" href="./style.css" />
</head>
<body>
<div class="container mt-4">
<header class="header">
<div class="container-header">
<div class="d-flex justify-content-end align-items-center">
<span class="text-muted">Developed by Felizardo</span>
<div class="separator mx-3"></div>
<a
href="https://github.com/devfel"
target="_blank"
rel="noopener noreferrer"
class="btn btn-outline-secondary btn-sm"
>
<i
class="fab fa-github mr-2"
style="font-size: 16px; vertical-align: middle"
></i>
DevFel
</a>
</div>
</div>
</header>
<h1 class="text-center">Calculadora de Rendimento Bruto e Líquido</h1>
<h2 class="text-center">
Converte Taxas Pré-Fixadas, CDI e IPCA+ de Renda Fixa. Saiba quanto vale
o título bruto em líquido e as taxas líquidas em brutas.
</h2>
<div class="row mt-4 align-items-end">
<div class="col-md-3 text-left">
<input
type="checkbox"
id="taxaSwitch"
data-toggle="toggle"
data-on="Líquido"
data-off="Bruto"
/>
</div>
<div class="col-md-3">
<label for="tipoinvestimento">Investimento:</label>
<select class="form-control" id="tipoinvestimento">
<option value="prefixado">Pré-Fixado</option>
<option value="cdi">CDI</option>
<option value="ipca">IPCA</option>
</select>
</div>
<div class="col-md-3">
<label for="cdiacumulado">CDI Acumulado 12M:</label>
<input
type="number"
class="form-control"
id="cdiacumulado"
value="13.42"
/>
</div>
<div class="col-md-3">
<label for="ipcaacumulado">IPCA Acumulado 12M:</label>
<input
type="number"
class="form-control"
id="ipcaacumulado"
value="4.61"
/>
</div>
</div>
<div class="row mt-4">
<div class="col-md-3">
<label for="bruto">Taxa Bruta (aa):</label>
<div class="d-flex align-items-center">
<span class="ipcavalue mr-1">IPCA+</span>
<span class="cdivalue mr-1">CDI(%)</span>
<input type="number" class="form-control" id="bruto" value="10" />
</div>
</div>
<div class="col-md-3">
<label for="liquido">Taxa Líquida (aa):</label>
<div class="d-flex align-items-center">
<span class="ipcavalue mr-1">IPCA+</span>
<span class="cdivalue mr-1">CDI(%)</span>
<input type="number" class="form-control" id="liquido" disabled />
</div>
</div>
<div class="col-md-4">
<label for="periodo">Período:</label>
<select class="form-control" id="periodo">
<option value="6">180 dias (6M)</option>
<option value="6">181 dias (6M)</option>
<option value="12">360 dias (1A)</option>
<option value="12">361 dias (1A)</option>
<option value="18">540 dias (1A e 6M)</option>
<option value="24">720 dias (2A)</option>
<option value="24">721 dias (2A)</option>
<option value="30">900 dias (2A e 6M)</option>
<option value="36">3 Anos</option>
<option value="48">4 Anos</option>
<option value="60">5 Anos</option>
<option value="120">10 Anos</option>
<option value="240">20 Anos</option>
<option value="360">30 Anos</option>
</select>
</div>
<div class="col-md-2 tex">
<label for="liquido">IR:</label>
<a
href="#"
data-toggle="tooltip"
title="Até 180 dias - 22,5%
De 181 a 360 dias - 20%
De 361 a 720 dias - 17,5%
A partir de 721 dias - 15%"
><span
class="material-icons"
style="font-size: 18px; cursor: pointer"
>
help_outline
</span></a
>
<input
type="text"
class="form-control text-center"
id="ir"
disabled
/>
</div>
</div>
<div class="row mt-5">
<div class="col-md-3">
<h4>Simulação</h4>
<label for="valorInvestido">Valor Investido:</label>
<input
type="number"
class="form-control"
id="valorInvestido"
value="100"
/>
</div>
</div>
<div class="row mt-4 text-center">
<div class="col-md-6">
<table class="table">
<thead class="thead-light">
<tr>
<th colspan="2" scope="col">Resultado com Taxa Bruta:</th>
</tr>
</thead>
<tbody>
<tr>
<td scope="row">Montante Bruto</td>
<td>R$ <span id="montanteBruto"></span></td>
</tr>
<tr>
<td scope="row">Desconto IR</td>
<td>R$ <span id="descontoIR"></span></td>
</tr>
<tr>
<th scope="row">Montante Líquido Final</th>
<th>R$ <span id="resultadoBruto"></span></th>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6">
<table class="table">
<thead class="thead-light">
<tr>
<th colspan="2" scope="col">Resultado com Taxa Líquida:</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Montante Líquido Final</th>
<th>R$ <span id="resultadoLiquido"></span></th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/js/bootstrap4-toggle.min.js"></script>
<script src="app.js"></script>
</body>
</html>