<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
    <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" > -->
    <style>
        *{
            font-family: 'Poppins', sans-serif;
            margin: 0;
            padding: 0;
            font-style: normal!important;
            font-variant: normal;
        }    
        
        body{
            padding: 10px;
        }
        td, th{
            padding:10px;
            font-style: normal!important;
            border: #888 solid 1px; 
            
        }
        
        thead > tr{
            color: #333;
            background-color: #888;
            font-style: normal!important;
        }
        
        table{
            border-collapse: collapse;
            width: 100%;
        }
        
        td{
           color: #888
        }
    </style>
</head>
<body>
    <h1>LOGO PORTAL INTELIZE</h1>
    <p>descrião do relatorio</p>
    <p>gerado em: <%= new Date().toLocaleDateString() %></p>
    <table class="table table-striped">
        <thead class="thead-dark">
            
                <tr>
                    <% for(const v in head){ %>
                        <th><%= head[v] %></th>
                    <% }; %>
                </tr>
            
        </thead>
        <tbody>
                <% for(const v of body){ %>
                <tr>                    
                    <td><%= v.num_referencia ? v.num_referencia : v.referencia_do_montante %></td>                    
                    <td><%= v.codigo_de_processamento == "80" ? "Activo" : "Inactivo" %></td>                    
                    <td><%= new Date(v.criada_r).toLocaleDateString()%>  <% new Date(v.criada_r).toLocaleTimeString() %></td>                    
                    <td><%= v.registo_produto %></td>                    
                    <td><%= new Date(v.data_limite_pagamento).toLocaleDateString() %></td>                    
                </tr>
                <% }; %>
        </tbody>
    </table>
</body>
</html>