<?= $this->extend('layouts/owner') ?>

<?= $this->section('content') ?>

<div class="container-fluid">

<div class="card shadow">

<div class="card-header bg-danger text-white">

Laporan Piutang

</div>

<div class="card-body">

<table class="table table-bordered">

<thead>

<tr>

<th>No</th>

<th>Invoice</th>

<th>Total</th>

<th>Sisa</th>

<th>Status</th>

</tr>

</thead>

<tbody>

<?php $no=1; foreach($receivable as $row): ?>

<tr>

<td><?= $no++ ?></td>

<td><?= $row['invoice'] ?? '-' ?></td>

<td>

Rp <?= number_format($row['total_piutang'] ?? 0,0,',','.') ?>

</td>

<td>

Rp <?= number_format($row['sisa_piutang'],0,',','.') ?>

</td>

<td><?= $row['status'] ?? '-' ?></td>

</tr>

<?php endforeach ?>

</tbody>

</table>

</div>

</div>

</div>

<?= $this->endSection() ?>