<?= $this->extend('client/layout/main') ?>
<?= $this->section('content') ?>
<h3 class="mb-3"><?= lang('App.my_invoices') ?></h3>
<div class="card p-3">
<table class="table">
    <thead><tr><th><?= lang('App.invoice_number') ?></th><th><?= lang('App.amount') ?></th><th><?= lang('App.due_date') ?></th><th><?= lang('App.status') ?></th></tr></thead>
    <tbody>
    <?php foreach ($invoices as $inv): ?>
        <tr>
            <td><a href="/client/invoices/<?= $inv['id'] ?>"><?= esc($inv['invoice_number']) ?></a></td>
            <td><?= number_format($inv['amount'], 2) ?> <?= esc($inv['currency']) ?></td>
            <td><?= esc($inv['due_date']) ?></td>
            <td><?= lang('App.' . $inv['status']) ?></td>
        </tr>
    <?php endforeach; ?>
    </tbody>
</table>
<?= $pager->links() ?>
</div>
<?= $this->endSection() ?>
