weekend

Today's Revenue

@php $newRegisteredUsers = 0; $lastMonthRegisteredUsers = 0; $currentMonthStartDate = Carbon\Carbon::now()->startOfMonth(); $lastMonthStartDate = Carbon\Carbon::now()->subMonth()->startOfMonth(); $oneWeekAgo = Carbon\Carbon::now()->subWeek(); $totalSales = 0; $yesterdayTotalSales = 0; @endphp @foreach ($orders as $order) @if ($order->status === 7 && $order->status === 8) @php $yesterdayTotalSales = 0; foreach ($order->orderItems as $orderItem) { $productPrice = $orderItem->productPrice; if ($productPrice) { $price = $productPrice->price * $orderItem->qty; if ($orderItem->delivery_options == 2) { $price += 60; } $yesterdayTotalSales += $price; } } @endphp @endif @endforeach
₱{{ $totalOnePointEightPercent }}

person

New Registered Users (1 Week Onwards)

@php $newRegisteredUsers = 0; $lastMonthRegisteredUsers = 0; $currentMonthStartDate = Carbon\Carbon::now()->startOfMonth(); $lastMonthStartDate = Carbon\Carbon::now()->subMonth()->startOfMonth(); $oneWeekAgo = Carbon\Carbon::now()->subWeek(); foreach ($users as $user) { $createdDate = $user->created_at; $isOneWeekOnwards = $createdDate->greaterThanOrEqualTo($oneWeekAgo); if ($isOneWeekOnwards) { $newRegisteredUsers++; if ($createdDate->greaterThanOrEqualTo($lastMonthStartDate)) { $lastMonthRegisteredUsers++; } } } @endphp
{{ $newRegisteredUsers }} New Registered Users

person

Pending Sales

@php $pendingSales = 0; @endphp @foreach ($orders as $order) @if (in_array($order->status, [0, 1, 2, 3, 4])) @php foreach ($order->orderItems as $orderItem) { $productPrice = $orderItem->productPrice; if ($productPrice) { $price = $productPrice->price * $orderItem->qty; if ($orderItem->delivery_options == 2) { $price += 60; } $pendingSales += $price; } } @endphp @endif @endforeach
₱{{ $pendingSales }}

weekend

Order Totals of All Shops

@php $totalSales = 0; $yesterdayTotalSales = 0; @endphp @foreach ($orders as $order) @if ($order->status === 13) @php foreach ($order->orderItems as $orderItem) { $productPrice = $orderItem->productPrice; if ($productPrice) { $price = $productPrice->price * $orderItem->qty; if ($orderItem->delivery_options == 2) { $price += 60; } $totalSales += $price; if ($order->created_at->isYesterday()) { $yesterdayTotalSales += $price; } } } @endphp @endif @endforeach
₱{{ $totalSales ?? 0 }}

Website Views

Last Campaign Performance


schedule

Campaign sent 2 days ago

Daily Sales
@php $todaySales = 0; $yesterdaySales = 0; $currentDate = Carbon\Carbon::now()->format('Y-m-d'); $yesterdayDate = Carbon\Carbon::yesterday()->format('Y-m-d'); @endphp @foreach ($orders as $order) @php if ($order->created_at->format('Y-m-d') === $currentDate) { foreach ($order->orderItems as $orderItem) { $productPrice = $orderItem->productPrice; if ($productPrice) { $price = $productPrice->price * $orderItem->qty; if ($orderItem->delivery_options == 2) { $price += 60; } $todaySales += $price; } } } elseif ($order->created_at->format('Y-m-d') === $yesterdayDate) { foreach ($order->orderItems as $orderItem) { $productPrice = $orderItem->productPrice; if ($productPrice) { $price = $productPrice->price * $orderItem->qty; if ($orderItem->delivery_options == 2) { $price += 60; } $yesterdaySales += $price; } } } @endphp @endforeach @php $percentageChange = 0; if ($yesterdaySales > 0) { $percentageChange = (($todaySales - $yesterdaySales) / $yesterdaySales) * 100; } @endphp

@if ($percentageChange > 0) (+{{ $percentageChange }}%) Increase in today's sales. @elseif ($percentageChange < 0) ({{ $percentageChange }}%) Decrease in today's sales. @else No change in today's sales compared to yesterday. @endif


schedule

Last updated:

Completed Orders
@php $count = 0; @endphp @foreach ($orders as $order) @if ($order->status === 7 && $count < 3) id) }}" style="font-family: Arial, sans-serif; font-size: 14px;">{{ $order->tracking_no }}
{{ $order->created_at->format('d M h:i A') }}
@php $count++; @endphp @endif @endforeach
person

Total Customers

{{ $users->where('role_as', '0')->count() ?? 0 }}


person

Total Sellers

{{ $users->whereIn('role_as', '2')->count() ?? 0 }}


person

Total Riders

{{ $users->where('role_as', '3')->count() ?? 0}}


shopping_cart

Total Orders

{{ $orders->count() ?? 0}}


star

Total Ratings - Customers

{{ $totalCustomerRatings }} ⭐


star

Total Ratings - Riders

{{ $totalRiderRatings }} ⭐


shopping_cart

Completed Orders

{{ $orders->where('status', 13)->count() ?? 0}}