Persano commited on
Commit
ab1393d
·
verified ·
1 Parent(s): 8157ee6

Update templates/relatorio_pdf.html

Browse files
Files changed (1) hide show
  1. templates/relatorio_pdf.html +91 -50
templates/relatorio_pdf.html CHANGED
@@ -1,62 +1,103 @@
1
  <!DOCTYPE html>
2
  <html lang="pt-BR">
3
  <head>
4
- <meta charset="UTF-8" />
5
- <title>Relatório de Simulação</title>
6
- <style>
7
- body {
8
- font-family: Arial, sans-serif;
9
- font-size: 12px;
10
- color: #333;
11
- padding: 20px;
12
- }
13
- h1, h2 {
14
- text-align: center;
15
- }
16
- table {
17
- width: 100%;
18
- border-collapse: collapse;
19
- margin-top: 20px;
20
- }
21
- th, td {
22
- border: 1px solid #888;
23
- padding: 8px;
24
- text-align: right;
25
- }
26
- th {
27
- background-color: #f2f2f2;
28
- font-weight: bold;
29
- }
30
- .destaque {
31
- background-color: #dff0d8;
32
- padding: 10px;
33
- margin-top: 20px;
34
- font-weight: bold;
35
- border-left: 4px solid #3c763d;
36
- }
37
- .grafico {
38
- text-align: center;
39
- margin-top: 30px;
40
- }
41
- </style>
 
 
 
42
  </head>
43
  <body>
44
- <h1>Relatório de Simulação</h1>
45
 
46
- <h2>Comparativo de Investimentos</h2>
 
47
 
48
- {% if grafico %}
49
- <div class="grafico">
50
- <img src="data:image/png;base64,{{ grafico }}" alt="Gráfico" width="500">
51
- </div>
52
- {% endif %}
 
 
 
 
 
 
 
 
 
 
53
 
54
- {{ tabela | safe }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- <div class="destaque">
57
- Investimento com maior retorno: {{ investimento_mais_valorizado }}<br />
58
- Valor final estimado: R$ {{ "{:,.2f}".format(valor_mais_alto).replace(",", "X").replace(".", ",").replace("X", ".") }}
59
- </div>
60
  </body>
61
  </html>
62
 
 
 
1
  <!DOCTYPE html>
2
  <html lang="pt-BR">
3
  <head>
4
+ <meta charset="UTF-8">
5
+ <style>
6
+ body {
7
+ font-family: DejaVu Sans, sans-serif;
8
+ margin: 40px;
9
+ font-size: 12px;
10
+ color: #222;
11
+ }
12
+ h1, h2, h3 {
13
+ text-align: center;
14
+ color: #2c3e50;
15
+ }
16
+ .resumo, .dados {
17
+ margin-bottom: 20px;
18
+ }
19
+ .resumo table, .dados table {
20
+ width: 100%;
21
+ border-collapse: collapse;
22
+ margin: 0 auto;
23
+ font-size: 12px;
24
+ }
25
+ .resumo td, .dados td, .dados th {
26
+ border: 1px solid #888;
27
+ padding: 6px;
28
+ text-align: center;
29
+ }
30
+ .grafico {
31
+ text-align: center;
32
+ margin-top: 20px;
33
+ }
34
+ .grafico img {
35
+ width: 90%;
36
+ margin: 10px auto;
37
+ }
38
+ .footer {
39
+ margin-top: 40px;
40
+ text-align: center;
41
+ font-size: 10px;
42
+ color: #666;
43
+ }
44
+ </style>
45
  </head>
46
  <body>
 
47
 
48
+ <h1>Relatório de Simulação de Investimentos</h1>
49
+ <h3>{{ now.strftime('%d de %B de %Y') }}</h3>
50
 
51
+ <div class="resumo">
52
+ <h2>Resumo Executivo</h2>
53
+ <table>
54
+ <tr>
55
+ <td><strong>Capital Inicial</strong></td>
56
+ <td><strong>Melhor Investimento</strong></td>
57
+ <td><strong>Valor Final</strong></td>
58
+ </tr>
59
+ <tr>
60
+ <td>R$ {{ "{:,.2f}".format(capital).replace(",", ".") }}</td>
61
+ <td>{{ investimento_mais_valorizado }}</td>
62
+ <td>R$ {{ "{:,.2f}".format(valor_mais_alto).replace(",", ".") }}</td>
63
+ </tr>
64
+ </table>
65
+ </div>
66
 
67
+ <div class="dados">
68
+ <h2>Parâmetros da Simulação</h2>
69
+ <table>
70
+ <tr>
71
+ <td><strong>Studio (mensal)</strong></td>
72
+ <td><strong>Franquia (anual)</strong></td>
73
+ <td><strong>Ações (anual)</strong></td>
74
+ <td><strong>Renda Fixa (anual)</strong></td>
75
+ </tr>
76
+ <tr>
77
+ <td>{{ studio_ret }}%</td>
78
+ <td>{{ franquia_ret }}%</td>
79
+ <td>{{ acoes_ret }}%</td>
80
+ <td>{{ renda_fixa }}%</td>
81
+ </tr>
82
+ </table>
83
+ </div>
84
+
85
+ <div class="dados">
86
+ <h2>Projeção dos Investimentos (5 anos)</h2>
87
+ {{ tabela | safe }}
88
+ </div>
89
+
90
+ <div class="grafico">
91
+ <h2>Gráfico de Evolução</h2>
92
+ <img src="data:image/png;base64,{{ grafico }}" alt="Gráfico dos investimentos">
93
+ <p style="font-size:10px;">Fonte: Simulação realizada via sistema Flask App</p>
94
+ </div>
95
+
96
+ <div class="footer">
97
+ <p>Relatório gerado automaticamente em {{ now.strftime('%d/%m/%Y %H:%M') }} | Desenvolvido por Rafael Persano</p>
98
+ </div>
99
 
 
 
 
 
100
  </body>
101
  </html>
102
 
103
+