added array_reverse on payout data table to show latest payouts first on the table

This commit is contained in:
jouls 2024-05-15 18:09:39 +08:00
parent 40549f484e
commit 68959b61ce
1 changed files with 2 additions and 2 deletions

View File

@ -315,7 +315,7 @@ $vendorPayoutData = json_decode($response, true);
<div class="ec-vendor-card-body">
<div class="ec-vendor-card-table">
<table class="table ec-table"
id="order-table" style="overflow-x: auto;"
id="payout-table" style="overflow-x: auto;"
data-role="table"
data-pagination="true"
data-searching="true"
@ -339,7 +339,7 @@ $vendorPayoutData = json_decode($response, true);
</thead>
<tbody class='table-group-divider'>
<?php
foreach ($vendorPayoutData as $x => $val) {
foreach (array_reverse($vendorPayoutData) as $x => $val) {
$vendorIdCheck = $val['vendor_details'][0]['vendor_id'];
$status = ucfirst(strtolower($val['status']));
$payoutDate = date("F d, Y", strtotime($val['createdAt']));