Update templates/relatorio_pdf.html
Browse files- templates/relatorio_pdf.html +111 -55
templates/relatorio_pdf.html
CHANGED
|
@@ -1,66 +1,122 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="pt-BR">
|
| 3 |
<head>
|
| 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 |
</head>
|
| 51 |
<body>
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
</body>
|
| 66 |
</html>
|
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="pt-BR">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<title>Relatório de Investimentos</title>
|
| 6 |
+
<style>
|
| 7 |
+
@page {
|
| 8 |
+
size: A4;
|
| 9 |
+
margin: 20mm 15mm 20mm 15mm;
|
| 10 |
+
@top-center {
|
| 11 |
+
content: element(header);
|
| 12 |
+
}
|
| 13 |
+
@bottom-center {
|
| 14 |
+
content: element(footer);
|
| 15 |
+
}
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
body {
|
| 19 |
+
font-family: Arial, sans-serif;
|
| 20 |
+
font-size: 12px;
|
| 21 |
+
color: #333;
|
| 22 |
+
margin: 0;
|
| 23 |
+
padding: 0;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
header {
|
| 27 |
+
display: block;
|
| 28 |
+
text-align: center;
|
| 29 |
+
font-weight: bold;
|
| 30 |
+
font-size: 16px;
|
| 31 |
+
margin-bottom: 10px;
|
| 32 |
+
border-bottom: 1px solid #ccc;
|
| 33 |
+
padding-bottom: 5px;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
footer {
|
| 37 |
+
display: block;
|
| 38 |
+
text-align: center;
|
| 39 |
+
font-size: 10px;
|
| 40 |
+
color: #666;
|
| 41 |
+
border-top: 1px solid #ccc;
|
| 42 |
+
padding-top: 5px;
|
| 43 |
+
position: fixed;
|
| 44 |
+
bottom: 0;
|
| 45 |
+
width: 100%;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.page-number:before {
|
| 49 |
+
content: "Página " counter(page);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.report-container {
|
| 53 |
+
max-width: 700px; /* Limita a largura da tabela */
|
| 54 |
+
margin: auto;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
table {
|
| 58 |
+
width: 100%;
|
| 59 |
+
border-collapse: collapse;
|
| 60 |
+
margin-bottom: 20px;
|
| 61 |
+
font-size: 12px;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
th {
|
| 65 |
+
background-color: #004080;
|
| 66 |
+
color: white;
|
| 67 |
+
padding: 8px;
|
| 68 |
+
border: 1px solid #004080;
|
| 69 |
+
text-align: center;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
td {
|
| 73 |
+
border: 1px solid #ddd;
|
| 74 |
+
padding: 6px 8px;
|
| 75 |
+
text-align: right;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
td:first-child {
|
| 79 |
+
text-align: center;
|
| 80 |
+
font-weight: bold;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
h1 {
|
| 84 |
+
text-align: center;
|
| 85 |
+
color: #004080;
|
| 86 |
+
margin-top: 0;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.graph-container {
|
| 90 |
+
text-align: center;
|
| 91 |
+
margin-bottom: 20px;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
</style>
|
| 95 |
</head>
|
| 96 |
<body>
|
| 97 |
|
| 98 |
+
<header role="header" id="header">
|
| 99 |
+
Relatório de Investimentos - Simulação Financeira
|
| 100 |
+
</header>
|
| 101 |
+
|
| 102 |
+
<div class="report-container">
|
| 103 |
+
|
| 104 |
+
<h1>Simulação de Investimentos - 5 Anos</h1>
|
| 105 |
|
| 106 |
+
<div class="graph-container">
|
| 107 |
+
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Investimentos" style="max-width: 100%; height: auto;" />
|
| 108 |
+
</div>
|
| 109 |
|
| 110 |
+
{{ tabela|safe }}
|
| 111 |
+
|
| 112 |
+
<p><strong>Investimento mais valorizado:</strong> {{ investimento_mais_valorizado }} com R$ {{ '{:,.2f}'.format(valor_mais_alto) }}</p>
|
| 113 |
+
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<footer role="contentinfo" id="footer">
|
| 117 |
+
Gerado em {{ now.strftime('%d/%m/%Y %H:%M') }} - Página <span class="page-number"></span>
|
| 118 |
+
</footer>
|
| 119 |
|
| 120 |
</body>
|
| 121 |
</html>
|
| 122 |
+
|