<?php include app()->basePath('app/Views/partials/header.php'); ?>

<section class="invoice-page">
    <div class="invoice-document">
        <div class="invoice-head">
            <div>
                <p class="eyebrow">Recibo</p>
                <h1><?= e($invoice['invoice_number']) ?></h1>
            </div>
            <strong>Moz Cursos</strong>
        </div>

        <div class="detail-list">
            <div><span>Cliente</span><strong><?= e($invoice['buyer_name']) ?></strong></div>
            <div><span>Email</span><strong><?= e($invoice['buyer_email']) ?></strong></div>
            <div><span>NUIT</span><strong><?= e($invoice['buyer_nuit'] ?: '-') ?></strong></div>
            <div><span>Emitido em</span><strong><?= e(format_date($invoice['issued_at'])) ?></strong></div>
        </div>

        <table class="invoice-table">
            <thead>
                <tr>
                    <th>Descricao</th>
                    <th>Subtotal</th>
                    <th>Desconto</th>
                    <th>Total</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><?= e($invoice['course_title']) ?></td>
                    <td><?= e(money_mzn($invoice['subtotal'])) ?></td>
                    <td><?= e(money_mzn($invoice['discount_total'])) ?></td>
                    <td><strong><?= e(money_mzn($invoice['total'])) ?></strong></td>
                </tr>
            </tbody>
        </table>

        <p class="small">Documento gerado automaticamente apos aprovacao do pagamento manual.</p>
    </div>
</section>

<?php include app()->basePath('app/Views/partials/footer.php'); ?>
