athina002 / index.html
maralvic's picture
Add 3 files
ff64116 verified
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Relatório MVICENTE Advocacia - ATHINA ADMINISTRADORA</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@page {
size: A4;
margin: 10mm;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.blue-gradient {
background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}
.scrollable-table-container {
position: relative;
overflow: auto;
max-height: 70vh;
}
.scrollable-table {
overflow: visible;
}
.sticky-header th {
position: sticky;
top: 0;
z-index: 10;
background-color: #1e40af;
color: white;
text-align: center;
vertical-align: middle;
}
.hover-row:hover {
background-color: #f0f9ff;
}
.text-xxs {
font-size: 0.65rem;
}
.rotate-text {
writing-mode: vertical-rl;
transform: rotate(180deg);
white-space: nowrap;
}
.monetary {
text-align: right;
font-family: 'Courier New', monospace;
}
.row-page {
width: 210mm;
height: 297mm;
padding: 15mm;
box-sizing: border-box;
background: white;
margin: 0 auto;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
position: relative;
overflow: hidden;
}
.row-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 10px;
}
.row-table th {
background-color: #1e40af;
color: white;
text-align: left;
padding: 8px;
font-size: 12px;
width: 30%;
}
.row-table td {
border: 1px solid #ddd;
padding: 8px;
font-size: 12px;
width: 70%;
}
.row-table tr:nth-child(even) {
background-color: #f8fafc;
}
@media print {
body * {
visibility: hidden;
}
#printableArea, #printableArea * {
visibility: visible;
}
#printableArea {
position: absolute;
left: 0;
top: 0;
width: 100%;
}
.no-print {
display: none !important;
}
.row-page {
page-break-after: always;
box-shadow: none;
margin: 0;
padding: 15mm;
}
}
.hidden-row-pages {
position: absolute;
left: -9999px;
top: -9999px;
width: 210mm;
height: 297mm;
}
.cda-list {
max-height: 80px;
overflow-y: auto;
padding: 4px;
border: 1px solid #e2e8f0;
border-radius: 4px;
background-color: #f8fafc;
}
.cda-item {
padding: 2px 0;
font-size: 0.75rem;
border-bottom: 1px solid #e2e8f0;
}
.cda-item:last-child {
border-bottom: none;
}
.summary-card {
transition: all 0.3s ease;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.summary-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.progress-bar {
height: 6px;
border-radius: 3px;
background-color: #e2e8f0;
overflow: hidden;
}
.progress-value {
height: 100%;
background-color: #3b82f6;
transition: width 0.5s ease;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltip-text {
visibility: hidden;
width: 200px;
background-color: #1e40af;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -100px;
opacity: 0;
transition: opacity 0.3s;
font-size: 0.8rem;
}
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.badge {
display: inline-block;
padding: 0.25em 0.5em;
font-size: 0.75em;
font-weight: 600;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}
.badge-primary {
color: #fff;
background-color: #3b82f6;
}
.badge-success {
color: #fff;
background-color: #10b981;
}
.badge-warning {
color: #fff;
background-color: #f59e0b;
}
.badge-danger {
color: #fff;
background-color: #ef4444;
}
.badge-info {
color: #fff;
background-color: #06b6d4;
}
/* Password protection styles */
#password-protection {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.password-box {
background-color: white;
padding: 2rem;
border-radius: 0.5rem;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
max-width: 400px;
width: 90%;
text-align: center;
}
.password-box h2 {
color: #1e40af;
margin-bottom: 1.5rem;
font-size: 1.5rem;
}
.password-input {
width: 100%;
padding: 0.75rem;
border: 2px solid #e2e8f0;
border-radius: 0.375rem;
font-size: 1rem;
margin-bottom: 1rem;
transition: border-color 0.2s;
}
.password-input:focus {
outline: none;
border-color: #3b82f6;
}
.password-btn {
background-color: #3b82f6;
color: white;
border: none;
padding: 0.75rem 1.5rem;
border-radius: 0.375rem;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.2s;
width: 100%;
}
.password-btn:hover {
background-color: #2563eb;
}
.error-message {
color: #ef4444;
margin-top: 0.5rem;
font-size: 0.875rem;
display: none;
}
.table-cell {
white-space: normal !important;
word-wrap: break-word;
}
.table-cell.cda-cell {
white-space: nowrap !important;
overflow-x: auto;
}
</style>
</head>
<body class="bg-gray-50 text-gray-800">
<!-- Password Protection -->
<div id="password-protection">
<div class="password-box">
<h2>Acesso Restrito</h2>
<p class="mb-4 text-gray-600">Por favor, insira a senha para acessar este relatório</p>
<input type="password" id="password-input" class="password-input" placeholder="Digite a senha">
<p id="error-message" class="error-message">Senha incorreta. Tente novamente.</p>
<button id="password-btn" class="password-btn">
<i class="fas fa-lock mr-2"></i> Acessar
</button>
</div>
</div>
<!-- Main Content (hidden until password is entered) -->
<div id="mainContent" class="hidden">
<div id="printableArea" class="max-w-7xl mx-auto p-6 bg-white shadow-lg rounded-lg">
<!-- Header -->
<header class="blue-gradient text-white rounded-t-lg p-6 mb-6">
<div class="flex flex-col">
<div class="flex justify-between items-start mb-4">
<div>
<div class="flex items-center">
<div class="bg-white p-2 rounded-lg mr-4">
<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
</svg>
</div>
<div>
<h1 class="text-3xl font-bold">MVICENTE ADVOCACIA</h1>
<h2 class="text-xl mt-2">RELATÓRIO DE NEGOCIAÇÕES TRIBUTÁRIAS ATIVAS</h2>
</div>
</div>
</div>
<div class="text-right">
<div class="text-xl font-semibold">
<i class="fas fa-calendar-alt mr-2"></i>
<span id="current-date"></span>
</div>
<div class="mt-2 text-sm bg-blue-700 px-3 py-1 rounded-full inline-block">
<i class="fas fa-lock mr-1"></i> CONFIDENCIAL
</div>
</div>
</div>
<div class="bg-blue-700 p-3 rounded-lg flex items-center">
<div class="mr-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-blue-200" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
</svg>
</div>
<div>
<p class="font-medium">ATHINA ADMINISTRADORA E CORRETORA DE SEGUROS LTDA.</p>
<p class="text-blue-200 text-sm">19.873.605/0001-15</p>
</div>
</div>
</div>
</header>
<!-- Summary Cards -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6 no-print">
<div class="summary-card bg-blue-50 border-l-4 border-blue-500 p-4 rounded-lg relative">
<div class="absolute top-2 right-2">
<span class="badge badge-primary">DÍVIDA</span>
</div>
<h3 class="text-xs font-semibold text-blue-800 uppercase">Valor Total Dívida</h3>
<p class="text-2xl font-bold text-blue-900 monetary">R$ 16.220.053,81</p>
<div class="mt-2">
<div class="flex justify-between text-xs text-blue-600">
<span>Consolidado</span>
<span>69.5%</span>
</div>
<div class="progress-bar mt-1">
<div class="progress-value" style="width: 69.5%"></div>
</div>
</div>
</div>
<div class="summary-card bg-green-50 border-l-4 border-green-500 p-4 rounded-lg relative">
<div class="absolute top-2 right-2">
<span class="badge badge-success">CONSOLIDAÇÃO</span>
</div>
<h3 class="text-xs font-semibold text-green-800 uppercase">Valor Consolidado</h3>
<p class="text-2xl font-bold text-green-900 monetary">R$ 11.269.586,41</p>
<div class="mt-2">
<div class="flex justify-between text-xs text-green-600">
<span>Desconto</span>
<span>30.5%</span>
</div>
<div class="progress-bar mt-1">
<div class="progress-value bg-green-500" style="width: 30.5%"></div>
</div>
</div>
</div>
<div class="summary-card bg-yellow-50 border-l-4 border-yellow-500 p-4 rounded-lg relative">
<div class="absolute top-2 right-2">
<span class="badge badge-warning">ECONÔMICO</span>
</div>
<h3 class="text-xs font-semibold text-yellow-800 uppercase">Desconto Total</h3>
<p class="text-2xl font-bold text-yellow-900 monetary">R$ 4.950.467,40</p>
<div class="mt-2">
<div class="flex justify-between text-xs text-yellow-600">
<span>Benefício</span>
<span>100%</span>
</div>
<div class="progress-bar mt-1">
<div class="progress-value bg-yellow-500" style="width: 100%"></div>
</div>
</div>
</div>
<div class="summary-card bg-indigo-50 border-l-4 border-indigo-500 p-4 rounded-lg relative">
<div class="absolute top-2 right-2">
<span class="badge badge-info">FLUXO</span>
</div>
<h3 class="text-xs font-semibold text-indigo-800 uppercase">Valor Entrada</h3>
<p class="text-2xl font-bold text-indigo-900 monetary">R$ 928.466,32</p>
<div class="mt-2">
<div class="flex justify-between text-xs text-indigo-600">
<span>Saldo</span>
<span>91.8%</span>
</div>
<div class="progress-bar mt-1">
<div class="progress-value bg-indigo-500" style="width: 8.2%"></div>
</div>
</div>
</div>
</div>
<!-- Filters (hidden in print) -->
<div class="mb-4 no-print">
<div class="flex flex-col md:flex-row md:items-center md:justify-between bg-gray-100 p-3 rounded-lg">
<div class="mb-2 md:mb-0">
<label for="search" class="block text-sm font-medium text-gray-700 mb-1">Buscar:</label>
<div class="relative">
<input type="text" id="search" placeholder="Pesquisar por conta, CDA..."
class="pl-8 pr-4 py-2 border border-gray-300 rounded-lg w-full md:w-64 focus:ring-blue-500 focus:border-blue-500">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="fas fa-search text-gray-400"></i>
</div>
</div>
</div>
<div class="flex space-x-2">
<div>
<label for="modalidade" class="block text-sm font-medium text-gray-700 mb-1">Modalidade:</label>
<select id="modalidade" class="pl-3 pr-8 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500">
<option value="">Todas</option>
<option value="0083">0083 - TRANSACAO POR ADESAO</option>
<option value="0004">0004 - PARCELAMENTO CONVENCIONAL</option>
</select>
</div>
<div>
<label for="status" class="block text-sm font-medium text-gray-700 mb-1">Status:</label>
<select id="status" class="pl-3 pr-8 py-2 border border-gray-300 rounded-lg focus:ring-blue-500 focus:border-blue-500">
<option value="">Todos</option>
<option value="deferida">Deferida e Consolidada</option>
<option value="aguardando">Aguardando Pagamento</option>
</select>
</div>
</div>
</div>
</div>
<!-- Main Table (hidden in print) -->
<div class="mb-8 no-print">
<div class="flex flex-col md:flex-row md:justify-between md:items-center mb-4">
<h2 class="text-xl font-semibold text-blue-900 mb-2 md:mb-0">
<i class="fas fa-table mr-2"></i>Detalhamento das Transações
</h2>
<div class="flex flex-col sm:flex-row sm:space-x-2 space-y-2 sm:space-y-0">
<button onclick="exportToPDF()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg text-sm font-medium flex items-center justify-center">
<i class="fas fa-file-pdf mr-2"></i>Exportar PDF
</button>
<button onclick="exportToExcel()" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-lg text-sm font-medium flex items-center justify-center">
<i class="fas fa-file-excel mr-2"></i>Exportar Excel
</button>
<button onclick="printReport()" class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded-lg text-sm font-medium flex items-center justify-center">
<i class="fas fa-print mr-2"></i>Imprimir
</button>
</div>
</div>
<div class="scrollable-table-container">
<table class="min-w-full divide-y divide-gray-200 border border-gray-200 scrollable-table">
<thead class="bg-blue-600 text-white sticky-header">
<tr>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">REF</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">CONTA</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">MODAL</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">SUBMOD</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">SITUAÇÃO</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">N. CDA</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">DÍVIDA</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">CONSOL</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">% DESC</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. DESC</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">Q PREST TOTAL</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">% ENT</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. ENT</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">Q PREST ENT</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST ENT</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST ENT 1</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST ENT F</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. SALDO</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">Q PREST SALDO</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST SALDO</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST SALDO 1</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST SALDO F</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">V. PREST ATUAL</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center">ORIENTAÇÃO</th>
<th class="px-3 py-3 text-xs font-semibold uppercase tracking-wider text-center no-print">AÇÕES</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200" id="tableBody">
<!-- Rows will be generated here -->
</tbody>
</table>
</div>
</div>
<!-- Individual Row Pages (hidden on screen, visible in print) -->
<div id="rowPages" class="hidden-row-pages">
<!-- Row pages will be generated here -->
</div>
<!-- Footer -->
<footer class="blue-gradient text-white rounded-b-lg p-4 text-center text-sm">
<div class="flex flex-col md:flex-row md:justify-between items-center">
<div class="mb-2 md:mb-0">
<p>MVICENTE Advocacia - Relatório gerado em <span id="current-date-footer"></span></p>
</div>
<div>
<p class="text-blue-100">Este documento é confidencial e destinado exclusivamente ao uso da diretoria</p>
</div>
<div class="mt-2 md:mt-0">
<span class="bg-blue-700 px-3 py-1 rounded-full text-xs">
<i class="fas fa-shield-alt mr-1"></i> Documento protegido
</span>
</div>
</div>
</footer>
</div>
</div>
<!-- Modal for detailed view -->
<div id="detailModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-screen overflow-y-auto">
<div class="flex justify-between items-center border-b border-gray-200 px-6 py-4">
<h3 class="text-xl font-semibold text-gray-800">Detalhes da Negociação</h3>
<button onclick="closeModal()" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6" id="modalContent">
<!-- Modal content will be loaded here -->
</div>
<div class="border-t border-gray-200 px-6 py-4 flex justify-end">
<button onclick="closeModal()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg">
Fechar
</button>
</div>
</div>
</div>
<script>
// Password protection
const CORRECT_PASSWORD = "ATHINA25";
const passwordProtection = document.getElementById('password-protection');
const passwordInput = document.getElementById('password-input');
const passwordBtn = document.getElementById('password-btn');
const errorMessage = document.getElementById('error-message');
const mainContent = document.getElementById('mainContent');
function checkPassword() {
const enteredPassword = passwordInput.value.trim();
if (enteredPassword === CORRECT_PASSWORD) {
// Hide password protection and show main content
passwordProtection.style.display = 'none';
mainContent.classList.remove('hidden');
// Generate the report
generateReport();
} else {
// Show error message
errorMessage.style.display = 'block';
passwordInput.focus();
}
}
// Add event listeners for password protection
passwordBtn.addEventListener('click', checkPassword);
passwordInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
checkPassword();
}
});
// Focus password input on page load
passwordInput.focus();
// Data for the report
const reportData = [
{
ref: "1",
conta: "12653341",
modalidade: "0083 - TRANSACAO POR ADESAO - EDITAL PGDAU N 06/2024",
submodalidade: "0073 - PREVIDENCIARIO - PJ PORTE DEMAIS - ATE 120 MESES - REDUCAO ATE 65%",
situacao: "AGUARDANDO PAGAMENTO",
cda: ["91 4 21 063445", "91 4 21 063446", "91 4 21 104970", "91 4 21 104971", "91 4 21 119846", "91 4 21 119847", "91 4 21 119849", "91 4 21 119850", "91 4 21 119851", "91 4 21 119852", "91 4 21 122645", "91 4 21 122646", "91 4 24 107254", "91 4 24 107256", "91 4 24 107257", "91 4 24 107258", "91 4 24 107260", "91 4 24 107302", "91 4 24 107303", "91 4 24 107342", "91 4 24 107343", "91 4 24 107344", "91 4 24 107345", "91 4 24 107347", "91 4 24 107421", "91 4 24 107424", "91 4 24 107425", "91 4 24 107426", "91 4 24 107427"],
valorDivida: "404.284,15",
valorConsolidado: "272.566,88",
percDesconto: "32,58%",
valorDesconto: "131.717,27",
qPrestTotal: "120",
percEntrada: "6,00%",
valorEntrada: "24.257,05",
qPrestEntrada: "6",
valorPrestEntrada: "4.042,84",
vPrestEnt1: "30/05/2025",
vPrestEntF: "30/10/2025",
valorSaldo: "248.309,83",
qPrestSaldo: "114",
valorPrestSaldo: "2.178,16",
vPrestSaldo1: "30/11/2025",
vPrestSaldoF: "30/04/2035",
valorPrestAtual: "4.042,84",
orientacao: "PAGAR 1A PRESTAÇÃO PARA CONFIRMAR ADESÃO",
linkDocumento: "https://drive.google.com/drive/folders/1kKbPhdKB5LO5oKPZx6B46_umOVDCK1we?usp=sharing"
},
{
ref: "2",
conta: "12653354",
modalidade: "0083 - TRANSACAO POR ADESAO - EDITAL PGDAU N 06/2024",
submodalidade: "0021 - DEMAIS DEBITOS - DEMAIS PESSOAS JURIDICAS - ATE 120 MESES - REDUCAO ATE 65%",
situacao: "AGUARDANDO PAGAMENTO",
cda: ["91 2 24 010757", "91 2 24 010768", "91 2 24 010772", "91 2 24 010783", "91 6 24 015615", "91 6 24 015616", "91 6 24 015621", "91 6 24 015624", "91 6 24 015625", "91 6 24 015635", "91 6 24 015636", "91 7 24 005020", "91 7 24 005021", "91 7 24 005023", "91 7 24 005026"],
valorDivida: "2.983.681,70",
valorConsolidado: "2.011.154,84",
percDesconto: "32,59%",
valorDesconto: "972.526,86",
qPrestTotal: "120",
percEntrada: "6,00%",
valorEntrada: "179.020,90",
qPrestEntrada: "6",
valorPrestEntrada: "29.836,82",
vPrestEnt1: "30/05/2025",
vPrestEntF: "30/10/2025",
valorSaldo: "1.832.133,94",
qPrestSaldo: "114",
valorPrestSaldo: "16.071,35",
vPrestSaldo1: "30/11/2025",
vPrestSaldoF: "30/04/2035",
valorPrestAtual: "29.836,82",
orientacao: "PAGAR 1A PRESTAÇÃO PARA CONFIRMAR ADESÃO",
linkDocumento: "https://drive.google.com/drive/folders/1kKbPhdKB5LO5oKPZx6B46_umOVDCK1we?usp=sharing"
},
{
ref: "3",
conta: "12653367",
modalidade: "0083 - TRANSACAO POR ADESAO - EDITAL PGDAU N 06/2024",
submodalidade: "0047 - PREVIDENCIARIO - PJ PORTE DEMAIS - ATE 60 MESES - REDUCAO ATE 65%",
situacao: "AGUARDANDO PAGAMENTO",
cda: ["91 4 24 107215", "91 4 24 107252", "91 4 24 107253", "91 4 24 107255", "91 4 24 107259", "91 4 24 107339", "91 4 24 107340", "91 4 24 107341", "91 4 24 107346", "91 4 24 107390", "91 4 24 107391", "91 4 24 107392", "91 4 24 107420", "91 4 24 107422", "91 4 24 107423", "91 4 24 107428"],
valorDivida: "1.999.123,22",
valorConsolidado: "1.347.808,87",
percDesconto: "32,58%",
valorDesconto: "651.314,35",
qPrestTotal: "60",
percEntrada: "6,00%",
valorEntrada: "119.947,39",
qPrestEntrada: "6",
valorPrestEntrada: "19.991,23",
vPrestEnt1: "30/05/2025",
vPrestEntF: "30/10/2025",
valorSaldo: "1.227.861,48",
qPrestSaldo: "54",
valorPrestSaldo: "22.738,18",
vPrestSaldo1: "30/11/2025",
vPrestSaldoF: "30/04/2030",
valorPrestAtual: "19.991,23",
orientacao: "PAGAR 1A PRESTAÇÃO PARA CONFIRMAR ADESÃO",
linkDocumento: "https://drive.google.com/drive/folders/1kKbPhdKB5LO5oKPZx6B46_umOVDCK1we?usp=sharing"
},
{
ref: "4",
conta: "12653439",
modalidade: "0004 - PARCELAMENTO CONVENCIONAL",
submodalidade: "0002 - PARCELAMENTO SEM GARANTIA - PESSOA JURIDICA - DIVIDA NAO PREVIDENCIARIA - ATE 15 MILHOES DE REAIS",
situacao: "AGUARDANDO PAGAMENTO",
cda: ["91 2 24 033467", "91 4 24 248603", "91 4 24 248604", "91 4 24 248605", "91 4 24 248606", "91 4 24 248607", "91 4 24 248608", "91 4 24 248609", "91 4 24 248610", "91 4 24 248611", "91 6 24 043910", "91 6 24 043912", "91 7 24 012704"],
valorDivida: "1.032.390,21",
valorConsolidado: "1.032.390,21",
percDescontono: "0,00%",
valorDesconto: "-",
qPrestTotal: "60",
percEntrada: "1,67%",
valorEntrada: "17.206,50",
qPrestEntrada: "1",
valorPrestEntrada: "17.206,50",
vPrestEnt1: "30/05/2025",
vPrestEntF: "30/05/2025",
valorSaldo: "1.015.183,71",
qPrestSaldo: "59",
valorPrestSaldo: "17.206,50",
vPrestSaldo1: "30/06/2025",
vPrestSaldoF: "30/04/2030",
valorPrestAtual: "17.206,50",
orientacao: "PAGAR 1A PRESTAÇÃO PARA CONFIRMAR ADESÃO",
linkDocumento: "https://drive.google.com/drive/folders/1kKbPhdKB5LO5oKPZx6B46_umOVDCK1we?usp=sharing"
},
{
ref: "5",
conta: "12675415",
modalidade: "0083 - TRANSACAO POR ADESAO - EDITAL PGDAU N 06/2024",
submodalidade: "0047 - PREVIDENCIARIO - PJ PORTE DEMAIS - ATE 60 MESES - REDUCAO ATE 65%",
situacao: "AGUARDANDO PAGAMENTO",
cda: ["141194090", "161333532", "147981905", "149353570", "163366586", "134873165", "161333524", "130452300", "141194081", "147981913", "131986961", "163366578", "173057438", "134873157", "131986953", "150501870", "128342463", "130452319", "148779140", "151313695", "173057420", "150501862", "161929400", "195664310", "195664329", "128342471", "148779131", "151998825", "160922160", "151313709", "162715803", "161929419", "160922151", "125812876", "131663151", "162715790", "131663143", "151998833", "149353561", "91 4 21 063442", "91 4 21 063443", "91 4 21 063444", "91 4 21 063447", "91 4 21 104968", "91 4 21 104969", "91 4 21 119843", "91 4 21 119844", "91 4 21 119845", "91 4 21 119848", "91 4 21 119853", "91 4 21 119854", "91 4 21 119855", "91 4 21 119856", "91 4 21 119857", "91 4 21 119858", "91 4 21 119859", "91 4 21 122643", "91 4 21 122644", "91 4 21 122647", "91 4 21 122648"],
valorDivida: "5.827.429,73",
valorConsolidado: "3.927.734,24",
percDesconto: "32,60%",
valorDesconto: "1.899.695,49",
qPrestTotal: "60",
percEntrada: "6,00%",
valorEntrada: "349.645,78",
qPrestEntrada: "6",
valorPrestEntrada: "58.274,30",
vPrestEnt1: "30/05/2025",
vPrestEntF: "30/10/2025",
valorSaldo: "3.578.088,46",
qPrestSaldo: "54",
valorPrestSaldo: "66.260,90",
vPrestSaldo1: "30/11/2025",
vPrestSaldoF: "30/04/2030",
valorPrestAtual: "58.274,30",
orientacao: "PAGAR 1A PRESTAÇÃO PARA CONFIRMAR ADESÃO",
linkDocumento: "https://drive.google.com/drive/folders/1kKbPhdKB5LO5oKPZx6B46_umOVDCK1we?usp=sharing"
},
{
ref: "6",
conta: "12675443",
modalidade: "0083 - TRANSACAO POR ADESAO - EDITAL PGDAU N 06/2024",
submodalidade: "0021 - DEMAIS DEBITOS - DEMAIS PESSOAS JURIDICAS - ATE 120 MESES - REDUCAO ATE 65%",
situacao: "AGUARDANDO PAGAMENTO",
cda: ["91 2 19 010459", "91 2 19 016324", "91 2 19 019310", "91 2 20 001015", "91 2 20 001016", "91 2 20 004065", "91 2 21 013912", "91 2 21 015618", "91 2 21 020953", "91 2 21 024355", "91 6 19 018158", "91 6 19 018159", "91 6 19 029744", "91 6 19 037476", "91 6 19 037477", "91 6 20 001732", "91 6 20 001733", "91 6 20 001734", "91 6 20 001735", "91 6 20 001736", "91 6 20 001737", "91 6 20 001738", "91 6 20 008236", "91 6 20 008237", "91 6 20 030011", "91 6 21 027635", "91 6 21 027636", "91 6 21 031418", "91 6 21 040469", "91 6 21 040470", "91 6 21 044442", "91 6 21 044449", "91 6 21 048327", "91 7 19 006322", "91 7 19 012687", "91 7 20 000554", "91 7 20 000555", "91 7 20 000556", "91 7 20 002321", "91 7 20 008013", "91 7 21 008155", "91 7 21 011622", "91 7 21 012875", "91 7 21 012877"],
valorDivida: "3.973.144,80",
valorConsolidado: "2.677.931,37",
percDesconto: "32,60%",
valorDesconto: "1.295.213,43",
qPrestTotal: "120",
percEntrada: "6,00%",
valorEntrada: "238.388,69",
qPrestEntrada: "6",
valorPrestEntrada: "39.731,45",
vPrestEnt1: "30/05/2025",
vPrestEntF: "30/10/2025",
valorSaldo: "2.439.542,68",
qPrestSaldo: "114",
valorPrestSaldo: "21.399,50",
vPrestSaldo1: "30/11/2025",
vPrestSaldoF: "30/04/2035",
valorPrestAtual: "39.731,45",
orientacao: "PAGAR 1A PRESTAÇÃO PARA CONFIRMAR ADESÃO",
linkDocumento: "https://drive.google.com/drive/folders/1kKbPhdKB5LO5oKPZx6B46_umOVDCK1we?usp=sharing"
}
];
// Set current date
const now = new Date();
const options = { day: '2-digit', month: '2-digit', year: 'numeric' };
const formattedDate = now.toLocaleDateString('pt-BR', options);
document.getElementById('current-date').textContent = formattedDate;
document.getElementById('current-date-footer').textContent = formattedDate;
// Format monetary values for Excel
function formatCurrencyForExcel(value) {
if (value === "-") return value;
// Remove dots (thousands separator) and replace comma with dot (decimal separator)
return parseFloat(value.replace(/\./g, '').replace(',', '.'));
}
// Generate CDA list HTML
function generateCDAList(cdaItems) {
if (Array.isArray(cdaItems)) {
return `<div class="cda-list">${cdaItems.map(item => `<div class="cda-item">${item}</div>`).join('')}</div>`;
}
return cdaItems; // fallback if not an array
}
// Show modal with details
function showDetails(rowData) {
const modal = document.getElementById('detailModal');
const modalContent = document.getElementById('modalContent');
modalContent.innerHTML = `
<div class="mb-6">
<h4 class="text-lg font-semibold text-blue-800 mb-2">Detalhes da Negociação #${rowData.ref}</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="bg-blue-50 p-4 rounded-lg">
<h5 class="font-medium text-blue-700 mb-2">Informações Básicas</h5>
<p><span class="font-medium">Conta:</span> ${rowData.conta}</p>
<p><span class="font-medium">Modalidade:</span> ${rowData.modalidade}</p>
<p><span class="font-medium">Submodalidade:</span> ${rowData.submodalidade}</p>
<p><span class="font-medium">Situação:</span> ${rowData.situacao}</p>
</div>
<div class="bg-green-50 p-4 rounded-lg">
<h5 class="font-medium text-green-700 mb-2">Valores</h5>
<p><span class="font-medium">Dívida:</span> <span class="monetary">${rowData.valorDivida}</span></p>
<p><span class="font-medium">Consolidado:</span> <span class="monetary">${rowData.valorConsolidado}</span></p>
<p><span class="font-medium">Desconto:</span> ${rowData.percDesconto} (<span class="monetary">${rowData.valorDesconto}</span>)</p>
</div>
</div>
</div>
<div class="mb-6">
<h5 class="font-medium text-gray-700 mb-2">CDAs Vinculadas</h5>
<div class="cda-list max-h-60 overflow-y-auto">
${Array.isArray(rowData.cda) ?
rowData.cda.map(item => `<div class="cda-item p-2 border-b border-gray-200 last:border-b-0">${item}</div>`).join('') :
`<div class="p-2">${rowData.cda}</div>`}
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div class="bg-yellow-50 p-4 rounded-lg">
<h5 class="font-medium text-yellow-700 mb-2">Entrada</h5>
<p><span class="font-medium">Valor:</span> <span class="monetary">${rowData.valorEntrada}</span> (${rowData.percEntrada})</p>
<p><span class="font-medium">Prestações:</span> ${rowData.qPrestEntrada} x <span class="monetary">${rowData.valorPrestEntrada}</span></p>
<p><span class="font-medium">1ª Prestação:</span> ${rowData.vPrestEnt1}</p>
<p><span class="font-medium">Última Prestação:</span> ${rowData.vPrestEntF}</p>
</div>
<div class="bg-purple-50 p-4 rounded-lg">
<h5 class="font-medium text-purple-700 mb-2">Saldo</h5>
<p><span class="font-medium">Valor:</span> <span class="monetary">${rowData.valorSaldo}</span></p>
<p><span class="font-medium">Prestações:</span> ${rowData.qPrestSaldo} x <span class="monetary">${rowData.valorPrestSaldo}</span></p>
<p><span class="font-medium">1ª Prestação:</span> ${rowData.vPrestSaldo1}</p>
<p><span class="font-medium">Última Prestação:</span> ${rowData.vPrestSaldoF}</p>
</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<h5 class="font-medium text-gray-700 mb-2">Resumo Financeiro</h5>
<div class="flex justify-between items-center">
<div>
<p class="text-sm">Total a pagar:</p>
<p class="text-xl font-bold monetary">${rowData.valorConsolidado}</span></p>
</div>
<div class="text-right">
<p class="text-sm">Economia:</p>
<p class="text-xl font-bold monetary">${rowData.valorDesconto}</span></p>
</div>
</div>
<div class="mt-4">
<p class="text-sm font-medium">Prestação Atual:</p>
<p class="text-lg monetary">${rowData.valorPrestAtual}</p>
</div>
</div>
<div class="mt-4 bg-blue-50 p-4 rounded-lg">
<h5 class="font-medium text-blue-700 mb-2">Orientações</h5>
<p>${rowData.orientacao}</p>
<div class="mt-3">
<a href="${rowData.linkDocumento}" target="_blank" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
<i class="fas fa-file-alt mr-2"></i> Gerar Documento
</a>
</div>
</div>
`;
modal.classList.remove('hidden');
}
// Close modal
function closeModal() {
document.getElementById('detailModal').classList.add('hidden');
}
// Filter table rows
function filterTable() {
const searchInput = document.getElementById('search').value.toLowerCase();
const modalidadeFilter = document.getElementById('modalidade').value;
const statusFilter = document.getElementById('status').value;
const rows = document.querySelectorAll('#tableBody tr');
rows.forEach(row => {
const rowData = row.getAttribute('data-row');
const rowObj = JSON.parse(rowData);
const matchesSearch =
rowObj.conta.toLowerCase().includes(searchInput) ||
rowObj.cda.toString().toLowerCase().includes(searchInput);
const matchesModalidade =
modalidadeFilter === '' ||
rowObj.modalidade.includes(modalidadeFilter);
const matchesStatus =
statusFilter === '' ||
(statusFilter === 'deferida' && rowObj.situacao.includes('DEFERIDA')) ||
(statusFilter === 'aguardando' && rowObj.situacao.includes('AGUARDANDO'));
if (matchesSearch && matchesModalidade && matchesStatus) {
row.classList.remove('hidden');
} else {
row.classList.add('hidden');
}
});
}
// Print the report
function printReport() {
window.print();
}
// Generate the report
function generateReport() {
const tableBody = document.getElementById('tableBody');
const rowPagesContainer = document.getElementById('rowPages');
// Clear existing content
tableBody.innerHTML = '';
rowPagesContainer.innerHTML = '';
// Generate main table rows and individual pages
reportData.forEach((row, index) => {
// Add row to main table
const tableRow = document.createElement('tr');
tableRow.className = index % 2 === 0 ? 'hover-row' : 'hover-row bg-gray-50';
tableRow.setAttribute('data-row', JSON.stringify(row));
tableRow.innerHTML = `
<td class="px-3 py-4 text-sm font-medium text-blue-600 table-cell">${row.ref}</td>
<td class="px-3 py-4 text-sm table-cell">${row.conta}</td>
<td class="px-3 py-4 text-sm table-cell">${row.modalidade}</td>
<td class="px-3 py-4 text-sm table-cell">${row.submodalidade}</td>
<td class="px-3 py-4 text-sm table-cell">${row.situacao}</td>
<td class="px-3 py-4 text-xs cda-cell">
<div class="max-w-xs overflow-auto h-20">${generateCDAList(row.cda)}</div>
</td>
<td class="px-3 py-4 text-sm font-medium monetary table-cell">${row.valorDivida}</td>
<td class="px-3 py-4 text-sm font-medium text-green-600 monetary table-cell">${row.valorConsolidado}</td>
<td class="px-3 py-4 text-sm table-cell">${row.percDesconto}</td>
<td class="px-3 py-4 text-sm font-medium monetary table-cell">${row.valorDesconto}</td>
<td class="px-3 py-4 text-sm table-cell">${row.qPrestTotal}</td>
<td class="px-3 py-4 text-sm table-cell">${row.percEntrada}</td>
<td class="px-3 py-4 text-sm font-medium monetary table-cell">${row.valorEntrada}</td>
<td class="px-3 py-4 text-sm table-cell">${row.qPrestEntrada}</td>
<td class="px-3 py-4 text-sm monetary table-cell">${row.valorPrestEntrada}</td>
<td class="px-3 py-4 text-sm table-cell">${row.vPrestEnt1}</td>
<td class="px-3 py-4 text-sm table-cell">${row.vPrestEntF}</td>
<td class="px-3 py-4 text-sm font-medium monetary table-cell">${row.valorSaldo}</td>
<td class="px-3 py-4 text-sm table-cell">${row.qPrestSaldo}</td>
<td class="px-3 py-4 text-sm monetary table-cell">${row.valorPrestSaldo}</td>
<td class="px-3 py-4 text-sm table-cell">${row.vPrestSaldo1}</td>
<td class="px-3 py-4 text-sm table-cell">${row.vPrestSaldoF}</td>
<td class="px-3 py-4 text-sm monetary table-cell">${row.valorPrestAtual}</td>
<td class="px-3 py-4 text-sm table-cell">${row.orientacao}</td>
<td class="px-3 py-4 text-sm no-print">
<button onclick="showDetails(${JSON.stringify(row).replace(/"/g, '&quot;')})" class="text-blue-600 hover:text-blue-800 mr-2 tooltip">
<i class="fas fa-eye"></i>
<span class="tooltip-text">Visualizar detalhes</span>
</button>
<a href="${row.linkDocumento}" target="_blank" class="text-green-600 hover:text-green-800 tooltip">
<i class="fas fa-file-alt"></i>
<span class="tooltip-text">Gerar documento</span>
</a>
</td>
`;
tableBody.appendChild(tableRow);
// Create individual page for this row
const rowPage = document.createElement('div');
rowPage.className = 'row-page';
rowPage.innerHTML = `
<div class="mb-4">
<div class="flex items-center mb-2">
<div class="bg-blue-100 p-2 rounded-lg mr-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
</svg>
</div>
<div>
<h1 class="text-2xl font-bold text-blue-800">MVICENTE ADVOCACIA</h1>
<h2 class="text-lg">RELATÓRIO DE NEGOCIAÇÕES TRIBUTÁRIAS ATIVAS</h2>
</div>
</div>
<div class="bg-blue-700 text-white p-2 rounded-lg text-sm">
<p>ATHINA ADMINISTRADORA E CORRETORA DE SEGUROS LTDA. - 19.873.605/0001-15</p>
<p class="mt-1">Data: ${formattedDate}</p>
</div>
</div>
<div class="mb-4">
<h3 class="text-lg font-semibold border-b border-gray-200 pb-2">Detalhes da Transação #${row.ref}</h3>
</div>
<table class="row-table">
<tr>
<th>Referência</th>
<td>${row.ref}</td>
</tr>
<tr>
<th>Conta Nº</th>
<td>${row.conta}</td>
</tr>
<tr>
<th>Modalidade</th>
<td>${row.modalidade}</td>
</tr>
<tr>
<th>Submodalidade</th>
<td>${row.submodalidade}</td>
</tr>
<tr>
<th>Situação</th>
<td>${row.situacao}</td>
</tr>
<tr>
<th>N. CDA</th>
<td><div style="max-height: 120px; overflow-y: auto;">${generateCDAList(row.cda)}</div></td>
</tr>
<tr>
<th>Valor Dívida</th>
<td class="monetary">${row.valorDivida}</td>
</tr>
<tr>
<th>Valor Consolidado</th>
<td class="monetary">${row.valorConsolidado}</td>
</tr>
<tr>
<th>% Desconto</th>
<td>${row.percDesconto}</td>
</tr>
<tr>
<th>Valor Desconto</th>
<td class="monetary">${row.valorDesconto}</td>
</tr>
<tr>
<th>Qtd. Prestações Total</th>
<td>${row.qPrestTotal}</td>
</tr>
<tr>
<th>% Entrada</th>
<td>${row.percEntrada}</td>
</tr>
<tr>
<th>Valor Entrada</th>
<td class="monetary">${row.valorEntrada}</td>
</tr>
<tr>
<th>Qtd. Prestações Entrada</th>
<td>${row.qPrestEntrada}</td>
</tr>
<tr>
<th>Valor Prestação Entrada</th>
<td class="monetary">${row.valorPrestEntrada}</td>
</tr>
<tr>
<th>1ª Prestação Entrada</th>
<td>${row.vPrestEnt1}</td>
</tr>
<tr>
<th>Última Prestação Entrada</th>
<td>${row.vPrestEntF}</td>
</tr>
<tr>
<th>Valor Saldo</th>
<td class="monetary">${row.valorSaldo}</td>
</tr>
<tr>
<th>Qtd. Prestações Saldo</th>
<td>${row.qPrestSaldo}</td>
</tr>
<tr>
<th>Valor Prestação Saldo</th>
<td class="monetary">${row.valorPrestSaldo}</td>
</tr>
<tr>
<th>1ª Prestação Saldo</th>
<td>${row.vPrestSaldo1}</td>
</tr>
<tr>
<th>Última Prestação Saldo</th>
<td>${row.vPrestSaldoF}</td>
</tr>
<tr>
<th>Valor Prestação Atual</th>
<td class="monetary">${row.valorPrestAtual}</td>
</tr>
<tr>
<th>Orientação</th>
<td>${row.orientacao}</td>
</tr>
</table>
<div class="mt-6 grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="bg-blue-50 p-3 rounded-lg">
<h4 class="font-medium text-blue-700 mb-2">Cronograma de Pagamentos</h4>
<p><span class="font-medium">Entrada:</span> ${row.qPrestEntrada} parcelas de <span class="monetary">${row.valorPrestEntrada}</span></p>
<p><span class="font-medium">Saldo:</span> ${row.qPrestSaldo} parcelas de <span class="monetary">${row.valorPrestSaldo}</span></p>
<p class="mt-2"><span class="font-medium">Prestação Atual:</span> <span class="monetary">${row.valorPrestAtual}</span></p>
</div>
<div class="bg-green-50 p-3 rounded-lg">
<h4 class="font-medium text-green-700 mb-2">Resumo Financeiro</h4>
<p><span class="font-medium">Total Consolidado:</span> <span class="monetary">${row.valorConsolidado}</span></p>
<p><span class="font-medium">Economia Total:</span> <span class="monetary">${row.valorDesconto}</span></p>
<div class="mt-3">
<a href="${row.linkDocumento}" target="_blank" class="inline-flex items-center px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700">
<i class="fas fa-file-alt mr-2"></i> Gerar Documento
</a>
</div>
</div>
</div>
<div class="mt-4 text-sm text-gray-600">
<p>MVICENTE Advocacia - Relatório gerado em ${formattedDate}</p>
<p>Este documento é confidencial e destinado exclusivamente ao uso da diretoria</p>
</div>
`;
rowPagesContainer.appendChild(rowPage);
});
// Add total row to main table
const totalRow = document.createElement('tr');
totalRow.className = 'bg-blue-50 font-bold';
totalRow.innerHTML = `
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800" colspan="6">TOTAL</td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">16.220.053,81</td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">11.269.586,41</td>
<td class="px-3 py-4 whitespace-nowrap text-sm"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">4.950.467,40</td>
<td class="px-3 py-4 whitespace-nowrap text-sm"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">928.466,32</td>
<td class="px-3 py-4 whitespace-nowrap text-sm"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">169.083,14</td>
<td class="px-3 py-4 whitespace-nowrap text-sm" colspan="2"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">10.341.120,09</td>
<td class="px-3 py-4 whitespace-nowrap text-sm"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">145.854,58</td>
<td class="px-3 py-4 whitespace-nowrap text-sm" colspan="2"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm font-medium text-blue-800 monetary">145.854,58</td>
<td class="px-3 py-4 whitespace-nowrap text-sm"></td>
<td class="px-3 py-4 whitespace-nowrap text-sm no-print"></td>
`;
tableBody.appendChild(totalRow);
// Add event listeners to filters
document.getElementById('search').addEventListener('input', filterTable);
document.getElementById('modalidade').addEventListener('change', filterTable);
document.getElementById('status').addEventListener('change', filterTable);
}
// Export to PDF with each row on a separate page
async function exportToPDF() {
const { jsPDF } = window.jspdf;
const pdf = new jsPDF('p', 'mm', 'a4');
// Show loading indicator
const loading = document.createElement('div');
loading.className = 'fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50';
loading.innerHTML = `
<div class="bg-white p-6 rounded-lg shadow-xl text-center">
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500 mx-auto mb-4"></div>
<p class="text-lg font-medium">Gerando PDF...</p>
<p class="text-sm text-gray-600 mt-1">Por favor, aguarde</p>
</div>
`;
document.body.appendChild(loading);
// Get all row pages
const rowPages = document.querySelectorAll('.row-page');
// Process each page sequentially
for (let i = 0; i < rowPages.length; i++) {
if (i > 0) {
pdf.addPage();
}
const page
</html>