Persano commited on
Commit
df7705a
·
verified ·
1 Parent(s): b21c33d

Update templates/relatorio_pdf.html

Browse files
Files changed (1) hide show
  1. templates/relatorio_pdf.html +57 -112
templates/relatorio_pdf.html CHANGED
@@ -1,146 +1,91 @@
1
  <!DOCTYPE html>
2
- <html lang="pt-BR">
3
  <head>
4
  <meta charset="UTF-8" />
5
- <title>Relatório de Simulação de Investimentos</title>
6
  <style>
7
  body {
8
  font-family: Arial, sans-serif;
9
- font-size: 13px;
10
- margin: 20px 40px;
11
  color: #333;
12
- background-color: #fff;
13
- }
14
- h1, h2 {
15
- color: #2a3f54;
16
- border-bottom: 2px solid #2a3f54;
17
- padding-bottom: 6px;
18
- margin-bottom: 20px;
19
- }
20
- .header {
21
- text-align: center;
22
- margin-bottom: 40px;
23
- }
24
- .header h1 {
25
- margin: 0;
26
- font-weight: 700;
27
- font-size: 26px;
28
  }
29
- .header p {
30
- font-size: 11px;
31
- color: #666;
32
- margin-top: 4px;
33
  }
34
  table {
 
35
  border-collapse: collapse;
36
- width: 65%;
37
- margin: 0 auto 30px auto;
38
- box-shadow: 0 1px 4px rgba(0,0,0,0.1);
39
- font-size: 11px;
40
- table-layout: fixed;
41
  }
42
  table, th, td {
43
- border: 1px solid #ccc;
44
  }
45
- th {
46
- background-color: #1a2a3a;
47
- color: #f0f0f0;
48
- font-weight: 700;
49
- padding: 4px 6px;
50
  text-align: center;
51
- word-wrap: break-word;
52
- }
53
- td {
54
- padding: 4px 6px;
55
- text-align: right;
56
- vertical-align: middle;
57
- word-wrap: break-word;
58
- }
59
- td:first-child {
60
- text-align: left;
61
- font-weight: 600;
62
- white-space: nowrap;
63
  }
64
- .section {
65
- margin-bottom: 40px;
66
  }
67
- .chart-container {
68
  text-align: center;
69
- margin-bottom: 40px;
70
- }
71
- .highlight {
72
- color: #1f618d;
73
- font-weight: 700;
74
- font-size: 15px;
75
  }
76
- .studio-value {
77
- color: #d35400;
78
- font-weight: 900;
79
- font-size: 18px;
80
- background-color: #fdebd0;
81
- padding: 10px 15px;
82
- border-radius: 6px;
83
- margin: 20px auto;
84
- text-align: center;
85
- width: fit-content;
86
- box-shadow: 0 0 10px rgba(211, 84, 0, 0.4);
87
  }
88
- .explanation {
89
- font-size: 12px;
90
- line-height: 1.5;
91
- color: #444;
92
- border-left: 4px solid #2a3f54;
93
- padding-left: 12px;
94
- margin-top: 15px;
95
  }
96
  </style>
97
  </head>
98
  <body>
99
- <div class="header">
100
- <h1>Relatório de Simulação de Investimentos</h1>
101
- <p>Data da Simulação: {{ now.strftime("%d/%m/%Y %H:%M") }}</p>
102
- </div>
103
 
104
- <div class="section">
105
- <h2>Parâmetros da Simulação</h2>
106
- <table>
107
- <tr><td>Capital Inicial</td><td>R$ {{ "%.2f"|format(capital) | replace(",", ".") }}</td></tr>
108
- <tr><td>Retorno Mensal Studio</td><td>{{ "%.2f"|format(studio_ret) }}%</td></tr>
109
- <tr><td>Valorização Anual</td><td>{{ "%.2f"|format(valorizacao) }}%</td></tr>
110
- <tr><td>Lucro Anual Franquia</td><td>R$ {{ "%.2f"|format(franquia_ret) | replace(",", ".") }}</td></tr>
111
- <tr><td>Retorno Anual Ações</td><td>{{ "%.2f"|format(acoes_ret) }}%</td></tr>
112
- <tr><td>Retorno Anual Renda Fixa</td><td>{{ "%.2f"|format(renda_fixa) }}%</td></tr>
113
- <tr><td>Inflação Anual</td><td>{{ "%.2f"|format(inflacao) }}%</td></tr>
114
- </table>
115
- </div>
116
 
117
- <div class="section chart-container">
118
- <h2>Projeção dos Investimentos</h2>
119
- <img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Investimentos" style="max-width: 100%; height: auto; border: 1px solid #ddd; padding: 5px; background: #fafafa;" />
120
  </div>
121
 
122
- <div class="section" style="page-break-before: always;">
123
- <h2>Tabela de Valores Projetados</h2>
124
- {{ tabela | safe }}
125
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
- <!-- Destaque especial para o valor patrimonial do Studio -->
128
- <div class="section studio-value">
129
- <strong>Valor Patrimonial do Studio:</strong> R$ {{ "%.2f"|format(valor_patrimonial_studio) | replace(",", ".") }}
130
- </div>
131
 
132
- <div class="section explanation">
133
- <h2>Impacto da Inflação nos Investimentos</h2>
134
- <p>A inflação é um fenômeno econômico que representa o aumento generalizado dos preços de bens e serviços ao longo do tempo, reduzindo o poder de compra da moeda. Isso significa que, mesmo que o valor nominal de um investimento aumente, seu retorno real pode ser menor se não acompanhar a inflação.</p>
135
- <p importante destacar que o <strong>Studio</strong> possui reajustes periódicos vinculados ao valor dos aluguéis, o que proporciona uma proteção natural contra a inflação. Esse mecanismo permite que o retorno do investimento acompanhe, em parte, o aumento dos custos e da renda no mercado imobiliário.</p>
136
- <p>Por isso, na avaliação dos investimentos, deve-se considerar o retorno real — ou seja, o retorno nominal descontado da inflação — para entender o crescimento efetivo do patrimônio. Investimentos que superam a inflação contribuem para a valorização real do capital, enquanto aqueles que ficam abaixo podem resultar em perda do poder de compra.</p>
137
- </div>
 
138
 
139
- <div class="section">
140
- <h2>Resumo dos Resultados</h2>
141
- <p>O investimento mais valorizado, considerando o desempenho projetado para o período de 5 anos, foi o <span class="highlight">{{ investimento_mais_valorizado }}</span> com um valor final estimado de <span class="highlight">R$ {{ "%.2f"|format(valor_mais_alto) | replace(",", ".") }}</span>.</p>
142
- <p>Este relatório foi desenvolvido para auxiliar investidores na tomada de decisão, fornecendo uma visão clara e detalhada das projeções financeiras com base nos parâmetros fornecidos.</p>
143
- </div>
144
  </body>
145
  </html>
146
 
 
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