<style>
    .table,
    .td,
    .th {
        border: 1px solid black;
        text-align: left;
    }

    .table {
        border-collapse: collapse;
        width: 100%;
    }

    .th,
    .td {
        padding: 5px;
    }
</style>

<?php

use Core\Helpers\Moneda; ?>

<div style="display:block; width: 100%;">
    <table width="100%" border="0">
        <tr>
            <td style="width: 22%; text-align: left"><strong>Nota de entrega:</strong></td>
            <td style="width: 40%; text-align: left"><?= $factura ?></td>
            <td style="text-align: right"><strong>Fecha:</strong></td>
            <td style="text-align: right"><?= date('d-m-Y', strtotime($fecha)) ?></td>
        </tr>
        <tr>
            <th style="text-align: left">Proveedor:</th>
            <td style="text-align: left"><?= $cliente ?></td>
            <th style="text-align: right">Cedula/Rif:</th>
            <td style="text-align: right"><?= $cedularif ?></td>
        </tr>
        <tr>
            <th style="text-align: left">Dirección:</th>
            <td style="text-align: left"><?= $direccion ?></td>
            <th style="text-align: right">Telefóno:</th>
            <td style="text-align: right"><?= $telefono ?></td>
        </tr>
    </table>
</div>

<div style="display:block; width: 100%; padding:15px"></div>

<div style="display:block; width: 100%;">
    <table class="table">
        <thead>
            <tr>
                <th class="th" style="text-align: left">Ref. + Descripción</th>
                <th class="th" style="text-align: right">Cant.</th>
                <th class="th" style="text-align: right">Precio</th>
                <th class="th" style="text-align: right">Importe</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($articulos as $row) : ?>
                <tr>
                    <td class="td" style="text-align: left"><strong><?= $row['cmpnart_procodigo'] ?></strong> <?= $row['cmpnart_propnombre'] ?></td>
                    <td class="td" style="text-align: right"><?= $row['cmpnart_procantidad'] ?></td>
                    <td class="td" style="text-align: right"><?= Moneda::moneda($row['cmpnart_proprecio'], $div_locale, $div_simbolo) ?></td>
                    <td class="td" style="text-align: right"><?= Moneda::moneda($row['cmpnart_prototal'], $div_locale, $div_simbolo) ?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
</div>

<p><strong>Observaciones:</strong></p>
<p style="text-align: justify;"><?= strtoupper($observaciones) ?></p>
