vb_book/app/Views/payment_status_table.php

38 lines
1.9 KiB
PHP

<table id="datatable-buttons" class="table table-striped nowrap w-100">
<thead class="custom-thead">
<tr>
<th><b>Customer Name</b></th>
<th><b>Membership ID</b></th>
<th><b>SCHEME Name</b></th>
<th>Date/Time</th>
<th><b>ORDER ID</b></th>
<th style="text-align: left;">Payment Status</th>
<th><b>Amount</b></th>
<th><b>Action</b></th>
</tr>
</thead>
<tbody class="custom-tbody">
<?php foreach ($payment_status_data as $row) { ?>
<tr>
<td style="text-align: left;"><?= isset($row['customer_name'])?$row['customer_name']:"-"?></td>
<td style="text-align: left;"><?= isset($row['membership_id'])?$row['membership_id']:"-"?></td>
<td style="text-align: left;"><?= isset($row['scheme_name'])?$row['scheme_name']:"-"?></td>
<td style="text-align: left;"><?= isset($row['created_at']) ? date("d/m/Y h:i A", strtotime($row['created_at'])) : '-' ?></td>
<td style="text-align: left;"><?= isset($row['order_id'])?$row['order_id']:"-"?></td>
<td style="text-align: left;"><?= isset($row['payment_status'])?$row['payment_status']:"-" ?></td>
<td style="text-align: right;"><?= isset($row['amount'])?$row['amount']:"-"?></td>
<td style="text-align: center;">
<?php if (($row['payment_status'] ?? '') === 'Not Received' && ! empty($row['order_id'])) { ?>
<button type="button" class="btn btn-sm btn-warning reconcile-btn" data-order-id="<?= esc($row['order_id']) ?>">
Sync with Paytm
</button>
<?php } else { ?>
-
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>