No Vendor Found.';
}
// $vendors = vendorList();
for ($x = $start; $x <= $end && $x < $totalVendors; $x++) {
$vendor = $vendors[$x];
$vendorId = $vendor['_id'];
$totalPayoutAmount = 0; // Initialize the total net amount for the current vendor
// Loop through the payout data and sum up the net amounts
foreach ($payoutData as $payout) {
if ($payout['vendor_details'][0]['vendor_id'] == $vendorId) {
$totalPayoutAmount += $payout['net_amount'];
}
}
$totalPayoutAmount = number_format($totalPayoutAmount, 2, '.', ',');
?>
$i";
// }
/* if ($totalVendors >= $vendorsPerPage) {
for ($i = 1; $i <= $totalPages; $i++) {
echo "$i";
}
} */
$start = max(1, $currentpage - 2);
$end = min($totalPages, $start + 4);
if ($start > 1) {
echo "1";
if ($start > 2) {
echo " ... ";
}
}
for ($i = $start; $i <= $end; $i++) {
echo "$i ";
}
if ($end < $totalPages) {
if ($end < $totalPages - 1) {
echo " ... ";
}
echo "$totalPages";
}
?>