<?= $this->extend('client/layout/main') ?>
<?= $this->section('content') ?>
<div class="card p-4">
    <h4><?= lang('App.invoice_number') ?>: <?= esc($invoice['invoice_number']) ?></h4>
    <p><?= lang('App.issue_date') ?>: <?= esc($invoice['issue_date']) ?></p>
    <p><?= lang('App.due_date') ?>: <?= esc($invoice['due_date']) ?></p>
    <p><?= lang('App.status') ?>: <?= lang('App.' . $invoice['status']) ?></p>
    <table class="table mt-3">
        <thead><tr><th>الوصف</th><th><?= lang('App.amount') ?></th></tr></thead>
        <tbody>
        <?php foreach ($items as $item): ?>
            <tr><td><?= esc($item['description']) ?></td><td><?= number_format($item['amount'], 2) ?></td></tr>
        <?php endforeach; ?>
        </tbody>
    </table>
    <p class="fw-bold fs-5"><?= lang('App.amount') ?>: <?= number_format($invoice['amount'], 2) ?> <?= esc($invoice['currency']) ?></p>
</div>
<?= $this->endSection() ?>
