fix payments

This commit is contained in:
root
2026-07-08 23:30:16 -04:00
parent 6e8da3cc2c
commit ed11cccecc
15 changed files with 959 additions and 132 deletions
+10 -6
View File
@@ -19,25 +19,29 @@
<th>Date</th>
<th>Invoice #</th>
<th class="text-end">Paid Amount</th>
<th class="text-end">Balance</th>
<th class="text-end">Invoice Balance</th>
<th>Method</th>
<th>Status</th>
<th>Payment Status</th>
<th>Invoice Status</th>
<th>School Year</th>
</tr>
</thead>
<tbody>
<?php if (empty($payments)): ?>
<tr>
<td colspan="6" class="text-center text-muted py-4">No payment</td>
<td colspan="8" class="text-center text-muted py-4">No payment</td>
</tr>
<?php else: ?>
<?php foreach ($payments as $p): ?>
<tr>
<td><?= esc(!empty($p['payment_date']) ? local_date($p['payment_date'], 'm-d-Y') : '') ?></td>
<td><?= esc($p['invoice_id'] ?? '') ?></td>
<td><?= esc($p['invoice_number'] ?? ('#' . (int)($p['invoice_id'] ?? 0))) ?></td>
<td class="text-end">$<?= number_format((float)($p['paid_amount'] ?? 0), 2) ?></td>
<td class="text-end">$<?= number_format((float)($p['balance'] ?? 0), 2) ?></td>
<td class="text-end">$<?= number_format((float)($p['invoice_current_balance'] ?? 0), 2) ?></td>
<td><?= esc($p['payment_method'] ?? '') ?></td>
<td><?= esc($p['status'] ?? '') ?></td>
<td><?= esc($p['payment_status'] ?? '') ?></td>
<td><?= esc($p['invoice_status'] ?? '') ?></td>
<td><?= esc($p['school_year'] ?? '') ?></td>
</tr>
<?php endforeach; ?>
<?php endif; ?>