louie_branch #65

Merged
MarkHipe merged 11 commits from louie_branch into main 2024-04-23 09:32:23 +08:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit f9e03219fa - Show all commits

View File

@ -17,6 +17,10 @@ if($_SESSION["user_type"]!="admin"){
$all_orders = getAllOrder();
$num_orders = count($all_orders);
date_default_timezone_set('Asia/Manila');
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
@ -1041,7 +1045,6 @@ $num_orders = count($all_orders);
// Slice the array to get the last 10 elements and reverse it to maintain order
$latestOrders = array_slice($all_orders, max(0, $totalOrders - 10), 10);
foreach (array_reverse($latestOrders) as $x => $val) {
date_default_timezone_set('Asia/Manila');
$paymentStatus = strtolower($val['payment']['status']);
$formattedOrderDate = date('m-d-Y', strtotime($val['order_date']));
$orderId = $val['_id'];