Persano commited on
Commit
26419d7
·
verified ·
1 Parent(s): d9cd7b4

Update templates/relatorio_pdf.html

Browse files
Files changed (1) hide show
  1. templates/relatorio_pdf.html +46 -70
templates/relatorio_pdf.html CHANGED
@@ -1,91 +1,67 @@
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
- margin: 20px;
11
- color: #333;
12
- }
13
- h1, h2, h3 {
14
- color: #2c3e50;
15
- }
16
- table {
17
- width: 100%;
18
- border-collapse: collapse;
19
- margin-bottom: 15px;
20
- }
21
- table, th, td {
22
- border: 1px solid #999;
23
- }
24
- th, td {
25
- padding: 6px 8px;
26
- text-align: center;
27
- }
28
- th {
29
- background-color: #f2f2f2;
30
- }
31
- .grafico {
32
- text-align: center;
33
- margin-bottom: 20px;
34
- }
35
- p {
36
- line-height: 1.4;
37
- }
38
- ul {
39
- margin-top: 0;
40
- margin-bottom: 15px;
41
- }
42
  </style>
43
  </head>
44
  <body>
45
  <h1>Relatório de Simulação de Investimentos</h1>
46
- <p><strong>Data da geração:</strong> {{ now.strftime('%d/%m/%Y %H:%M:%S') }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  <h2>Resumo dos Investimentos</h2>
49
- <p>{{ analise_final|safe }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  <div class="grafico">
52
- <img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de investimentos" style="max-width: 100%; height: auto;">
 
53
  </div>
54
 
55
- <h3>Resumo Final</h3>
56
- <table>
57
- <thead>
58
- <tr>
59
- <th>Investimento</th>
60
- <th>Valor Final</th>
61
- <th>Retorno Absoluto</th>
62
- <th>Retorno (%)</th>
63
- </tr>
64
- </thead>
65
- <tbody>
66
- {% for item in resumo %}
67
- <tr>
68
- <td>{{ item.Investimento }}</td>
69
- <td>{{ item["Valor Final"] }}</td>
70
- <td>{{ item["Retorno Absoluto"] }}</td>
71
- <td>{{ item["Retorno (%)"] }}</td>
72
- </tr>
73
- {% endfor %}
74
- </tbody>
75
- </table>
76
-
77
- {% if comentario_extra %}
78
- <p><em>{{ comentario_extra|safe }}</em></p>
79
- {% endif %}
80
 
81
  {{ explicacao_detalhada|safe }}
82
 
83
- <h3>Valor Patrimonial do Studio (último ano):</h3>
84
- <p><strong>{{ valor_patrimonial_studio|formatar_brl }}</strong></p>
85
-
86
- <h3>Tabela de Valores Anuais</h3>
87
- {{ tabela|safe }}
88
-
89
  </body>
90
  </html>
91
 
 
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 { font-family: Arial, sans-serif; margin: 40px; }
8
+ h1, h2, h3 { color: #333; }
9
+ .table { border-collapse: collapse; width: 100%; margin-top: 20px; }
10
+ .table th, .table td { border: 1px solid #ccc; padding: 8px; text-align: right; }
11
+ .table th { background-color: #f2f2f2; }
12
+ .center { text-align: center; }
13
+ .grafico { margin-top: 30px; text-align: center; }
14
+ .small { font-size: 0.9em; color: #666; margin-top: 20px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  </style>
16
  </head>
17
  <body>
18
  <h1>Relatório de Simulação de Investimentos</h1>
19
+ <p><strong>Data:</strong> {{ now.strftime("%d/%m/%Y %H:%M") }}</p>
20
+
21
+ <h2>Parâmetros da Simulação</h2>
22
+ <ul>
23
+ <li>Capital Inicial: <strong>R$ {{ "%.2f"|format(capital).replace(".", ",") }}</strong></li>
24
+ <li>Studio - Retorno Mensal: <strong>{{ studio_ret }}%</strong></li>
25
+ <li>Studio - Valorização Anual: <strong>{{ valorizacao }}%</strong></li>
26
+ <li>Franquia - Lucro Anual: <strong>{{ franquia_ret }}%</strong></li>
27
+ <li>Ações - Retorno Anual: <strong>{{ acoes_ret }}%</strong></li>
28
+ <li>Renda Fixa - Retorno Anual: <strong>{{ renda_fixa }}%</strong></li>
29
+ <li>Inflação Anual: <strong>{{ inflacao }}%</strong></li>
30
+ </ul>
31
+
32
+ <h2>Análise Final</h2>
33
+ {{ analise_final|safe }}
34
+ {{ comentario_extra|safe }}
35
 
36
  <h2>Resumo dos Investimentos</h2>
37
+ <table class="table">
38
+ <tr>
39
+ <th>Investimento</th>
40
+ <th>Valor Final</th>
41
+ <th>Retorno Absoluto</th>
42
+ <th>Retorno (%)</th>
43
+ </tr>
44
+ {% for item in resumo %}
45
+ <tr>
46
+ <td style="text-align: left;">{{ item['Investimento'] }}</td>
47
+ <td>{{ item['Valor Final'] }}</td>
48
+ <td>{{ item['Retorno Absoluto'] }}</td>
49
+ <td>{{ item['Retorno (%)'] }}</td>
50
+ </tr>
51
+ {% endfor %}
52
+ </table>
53
 
54
  <div class="grafico">
55
+ <h2>Gráfico Comparativo</h2>
56
+ <img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Investimentos" style="max-width: 100%; height: auto;">
57
  </div>
58
 
59
+ <h2>Tabela de Evolução</h2>
60
+ {{ tabela|safe }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  {{ explicacao_detalhada|safe }}
63
 
64
+ <p class="small">Relatório gerado automaticamente.</p>
 
 
 
 
 
65
  </body>
66
  </html>
67