fix payments
This commit is contained in:
@@ -21,15 +21,17 @@
|
||||
<th>Date</th>
|
||||
<th>Invoice</th>
|
||||
<th class="text-end">Paid</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): ?>
|
||||
@@ -40,9 +42,11 @@
|
||||
<?= $inv !== '' ? esc($inv) : ('#' . (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; ?>
|
||||
|
||||
@@ -219,11 +219,12 @@
|
||||
<tr>
|
||||
<th>Paid Date</th>
|
||||
<th>Paid Amount</th>
|
||||
<th>Balance</th>
|
||||
<th>Invoice Balance</th>
|
||||
<th>Payment Method</th>
|
||||
<th>Check Number</th>
|
||||
<th>Installments</th>
|
||||
<th>Status</th>
|
||||
<th>Payment Status</th>
|
||||
<th>Invoice Status</th>
|
||||
<th>Check/Card File</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@@ -242,7 +243,7 @@
|
||||
?>
|
||||
<td><?= esc($paidAt) ?></td>
|
||||
<td>$<?= number_format((float)($payment['paid_amount'] ?? 0), 2) ?></td>
|
||||
<td>$<?= number_format((float)($payment['balance'] ?? 0), 2) ?></td>
|
||||
<td>$<?= number_format((float)($payment['invoice_current_balance'] ?? 0), 2) ?></td>
|
||||
<td>
|
||||
<?php if ($method === 'cash'): ?>
|
||||
<span class="badge" style="background-color:#28a745;color:#fff;">Cash</span>
|
||||
@@ -255,8 +256,9 @@
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?= !empty($payment['check_number']) ? esc($payment['check_number']) : '-' ?></td>
|
||||
<td><?= esc($payment['number_of_installments'] ?? '') ?></td>
|
||||
<td><?= esc($payment['status'] ?? '') ?></td>
|
||||
<td><?= esc($payment['installment_seq'] ?? $payment['number_of_installments'] ?? '') ?></td>
|
||||
<td><?= esc($payment['payment_status'] ?? '') ?></td>
|
||||
<td><?= esc($payment['invoice_status'] ?? '') ?></td>
|
||||
<td>
|
||||
<?php if (!empty($payment['check_file'])): ?>
|
||||
<a href="#" data-bs-toggle="modal" data-bs-target="#checkModal<?= (int)$payment['id'] ?>">View</a> /
|
||||
|
||||
Reference in New Issue
Block a user