{{ $restaurant->name ?? __('whatsapp::app.restaurant') }}

{{ $reportTitle }}

{{ __('whatsapp::app.generatedOn') }} {{ now()->setTimezone(config('app.timezone', 'UTC'))->format('d M, Y H:i:s T') }}

{{ __('whatsapp::app.totalOrders') }}
{{ number_format($totalOrders) }}
{{ __('whatsapp::app.totalRevenue') }}
{{ $currency }}{{ number_format($totalRevenue, 2) }}
{{ __('whatsapp::app.netRevenue') }}
{{ $currency }}{{ number_format($netRevenue, 2) }}
{{ __('whatsapp::app.totalTax') }}
{{ $currency }}{{ number_format($totalTax, 2) }}
{{ __('whatsapp::app.totalDiscount') }}
{{ $currency }}{{ number_format($totalDiscount, 2) }}
{{ __('whatsapp::app.averageOrder') }}
{{ $currency }}{{ $totalOrders > 0 ? number_format($totalRevenue / $totalOrders, 2) : '0.00' }}
@if(isset($ordersByDate) && $ordersByDate->isNotEmpty())
{{ __('whatsapp::app.dailyBreakdown') }}
@foreach($ordersByDate as $date => $dateOrders) @endforeach
{{ __('whatsapp::app.date') }} {{ __('whatsapp::app.orders') }} {{ __('whatsapp::app.revenue') }}
{{ \Carbon\Carbon::parse($date)->format('d M, Y') }} {{ number_format($dateOrders->count()) }} {{ $currency }}{{ number_format($dateOrders->sum(function($order) { return (float) ($order->total ?? $order->sub_total ?? 0); }), 2) }}
@endif @if(isset($ordersByStatus) && $ordersByStatus->isNotEmpty())
{{ __('whatsapp::app.ordersByStatus') }}
@foreach($ordersByStatus as $status => $count) @endforeach
{{ __('whatsapp::app.status') }} {{ __('whatsapp::app.count') }}
{{ ucfirst(str_replace('_', ' ', $status)) }} {{ number_format($count) }}
@endif