<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="author" content="">
  <style>
    table {
        width: 100%;
    }
    p{
        font-size: 14px;
    }
    .giro{
        font-size: 14px;
    }
    footer {
        position: fixed;
        left: 0px;
        bottom: -50px;
        right: 0px;
        height: 40px;
        border-bottom: 2px solid #ddd;
    }
    footer .page:after {
        content: counter(page);
    }
    footer table {
        width: 100%;
    }
    footer .page {
        text-align: right;
    }
    footer .izq {
        text-align: left;
    }

    footer .message {
        text-align: center;
    }

    
  </style>
</head>

<body id="page-top" style="border: 1px solid black" >
    <footer style="width: 100%">
        <table>
          <tr>
            <td>
                <span class="message" style="width: 50%;">Este documento no es un comprobante de pago ni lo exime de adeudos anteriores.</span>
            </td>
            <td>
                <span class="page">Página</span>
            </td>
          </tr>
        </table>
      </footer>
    <div>
        <main> 
            <table width="100%" cellspacing="0" cellpadding="0">
                <tr>
                    <td style="text-align: center; vertical-align: center;">
                        <img style="height: 80px; padding: 1px;" src="{{$folderPath.'logotipo2.jpg'}}"/>
                    </td>
                    <td style="vertical-align: center; padding: 1px; margin-top: 0px;">
                        <h2 style="text-align: center; padding: 0px; margin: 0px;">
                            R. AYUNTAMIENTO 2019-2022
                            <P style="background-color:#5f0c0c; color: white; text-align: center; padding: 0px; margin: 0px;">TESORERÍA MUNICIPAL</P>
                            <P style="text-align: center; padding: 0px; margin: 0px;">GÓMEZ PALACIO, DGO.</P>
                        </h2>
                        <P style="text-align: center;font-size: 12px; padding: 0px; margin: 0px;">WWW.GOMEZPALACIO.GOB.MX</P>
                    </td>
                    <TD style="text-align: center; vertical-align: center;">
                        <IMG style="height: 80px; text-align: center; padding: 1px;" SRC="{{$folderPath.'cuna.jpg'}}"/>
                    </TD>
                </tr>
            </table>
            <br/>
            <table>
                <tr>
                    <td style="text-align: right;">
                        <span style="color: #5f0c0c; font-weight: bolder;">Fecha de consulta:</span> 
                        <span>{{$tday.'/'.$month.'/'.$tyear}}</span>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right;">
                        <span style="color: #5f0c0c; font-weight: bolder;">No. Cuenta: </span>
                        <span>{{ctype_space($laPortador->LAP_RECIBOOFICIAL) || null || '' ? '-' : $laPortador->LAP_RECIBOOFICIAL}}</span>
                    </td>
                </tr>
            </table>
            <h3 style="background-color: #5f0c0c;color:white; font-weight: bolder; padding:1px; margin: 1px;">Datos Generales</h3>
            <table  width="100%" cellspacing="1" cellpadding="1" style="padding:2px;">
                <tr>
                    <td colspan="4">
                        <span style="font-weight: bolder">Empresa:</span>
                        <span>{{ctype_space($laPortador->LAP_EMPRESA) || null || '' ? '-' : $laPortador->LAP_EMPRESA}}</span>
                    </td>
                    <td colspan="2">
                        <span style="font-weight: bolder">R.F.C.: </span>
                        <span>{{ctype_space($laPortador->LAP_RFC) || null || '' ? '-' : $laPortador->LAP_RFC}}</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <span style="font-weight: bolder">Número de Serie:</span>
                        <span>{{ctype_space($laPortador->LAP_NUMSERIE) || null || '' ? '-' : $laPortador->LAP_NUMSERIE}}</span>
                    </td>
                    <td colspan="2">
                        <span style="font-weight: bolder">Marca: </span>
                        <span>{{ctype_space($laPortador->LAP_MARCA) || null || '' ? '-' : $laPortador->LAP_MARCA}}</span>
                    </td>
                    <td colspan="2">
                        <span style="font-weight: bolder">Modelo: </span>
                        <span>{{ctype_space($laPortador->LAP_MODELO) || null || '' ? '-' : $laPortador->LAP_MODELO}}</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <span style="font-weight: bolder">Tipo: </span>
                        <span>{{ctype_space($laPortador->LAP_TIPO) || null || '' ? '-' : $laPortador->LAP_TIPO}}</span>
                    </td>
                    <td colspan="2">
                        <span style="font-weight: bolder">Color: </span>
                        <span> {{ctype_space($laPortador->LAP_COLOR) || null || '' ? '-' : $laPortador->LAP_COLOR}}</span>
                    </td>
                    <td colspan="2">
                        <span style="font-weight: bolder">Año: </span>
                        <span> {{ctype_space($laPortador->LAP_COSTO) || null || '' ? '-' : $laPortador->LAP_COSTO}}</span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <span style="font-weight: bolder">Teléfono: </span>
                        <span>{{ctype_space($laPortador->LAP_TELEFONO) || null || '' ? '-' : $laPortador->LAP_TELEFONO}}</span>
                    </td>
                    <td colspan="4">
                        <span style="font-weight: bolder">Fecha de Alta: </span>
                        <span>{{ctype_space($createdAt) || null || '' ? '-' : $createdAt}}</span>
                    </td>
                </tr>
            </table>
            <h3 style="background-color: #5f0c0c;color:white; font-weight: bolder; padding:1px; margin: 1px;">Dirección</h3>
            <table width="100%" cellspacing="1" cellpadding="1" style="padding:2px;">
                <tr>
                    <td>
                        <span>{{ctype_space($laPortador->LAP_Domicilio) || null || '' ? '-' : $laPortador->LAP_Domicilio}}
                            {{ctype_space($laPortador->LAP_COLONIA) || null || '' ? '-' : $laPortador->LAP_COLONIA}}, GÓMEZ PALACIO, DURANGO.
                        </span>
                    </td>
                </tr>
            </table>
            <h3 style="background-color: #5f0c0c;color:white; font-weight: bolder; padding:1px; margin: 1px;">Historial de Pagos</h3>
            <table>
                <tr>
                    <th>Fecha de Pago</th>
                    <th>Folio Físico</th>
                    <th>Recibo Oficial</th>
                    <th>Importe</th>
                    <th>Recargos</th>
                    <th>Sanciones</th>
                    <th>GASTOS</th>
                </tr>
                @foreach($detPagos as $element)
                <tr>                    
                    <td><p style="text-align: center;">{{$element->DPA_FECHPAGO}}</p></td>
                    <td><p style="text-align: center;">{{$element->DPA_FOLIO}}</p></td>
                    <td><p style="text-align: center;">{{$element->DPA_RECIBO_OFICIAL}}</p></td>
                    <td><p style="text-align: center;">{{$element->DPA_IMPORTE}}</p></td>
                    <td><p style="text-align: center;">{{$element->DPA_RECARGOS}}</p></td>
                    <td><p style="text-align: center;">{{$element->DPA_SANCIONES}}</p></td>
                    <td><p style="text-align: center;">{{$element->DPA_GASTOS}}</p></td>
                </tr>
                @endforeach
            </table>
        </main>
    </div>
    
</body>
</html>
