fixed admin-payments table amount and formatted date

This commit is contained in:
jouls 2024-04-19 08:53:13 +08:00
parent 3d9d52dfcc
commit d1bf1a6395
1 changed files with 5 additions and 4 deletions

View File

@ -83,7 +83,7 @@ if (isset($_SESSION["token"])) {
// $token = loginRenew($_SESSION["email"], $_SESSION["password"], $token);
// $_SESSION["token"] = $token;
date_default_timezone_set('Asia/Manila');
?>
<!DOCTYPE html>
@ -288,7 +288,7 @@ if (isset($_SESSION["token"])) {
</div>
<div class="card-body pt-0 pb-0 table-responsive">
<table class="table">
<table id='paymentsTable'class="table">
<thead>
<tr>
<th><input type="checkbox"></th>
@ -312,12 +312,13 @@ if (isset($_SESSION["token"])) {
if ($orderItems['payment']['status'] === 'PAID') {
foreach ($orderItems['items'] as $item) {
$displayDate = date('m-d-Y, g:i A', strtotime($orderItems['updatedAt']));
$isPayoutCompleted = !empty($orderItems['payout_status']);
?>
<tr>
<td><input type="checkbox" <?php echo $isPayoutCompleted ? 'disabled' : ''; ?>></td>
<td><?php echo $orderItems['payment_method']; ?></td>
<td><?php echo $item['price']; ?></td>
<td><?php echo $orderItems['total_amount']; ?></td>
<td>
<span class="badge badge-success"><?php echo $orderItems['payment']['status']; ?></span>
</td>
@ -327,7 +328,7 @@ if (isset($_SESSION["token"])) {
<td>
<a class="text-dark" href=""><?php echo $item['product']['name']; ?></a>
</td>
<td><?php echo $orderItems['updatedAt']; ?></td>
<td><?php echo $displayDate; ?></td>
<td hidden><?php echo $orderItems['_id']; ?></td>
<td class="text-right">
<div class="dropdown show d-inline-block widget-dropdown">