Daily Item Report

{{ $restaurant->name }}

@if($branch)

Branch: {{ $branch->name }}

@endif
Report Date: {{ $reportDate->format('F d, Y') }}
Time Period: {{ \Carbon\Carbon::parse($startTime)->format('h:i A') }} - {{ \Carbon\Carbon::parse($endTime)->format('h:i A') }}
Generated On: {{ now()->format('F d, Y h:i A') }}
System Generated Report
Total Revenue
{{ currency_format($menuItems->sum(fn($item) => $item->orders->sum(fn($order) => $order->amount)), $currencyId) }}
Total Quantity Sold
{{ $menuItems->sum(fn($item) => $item->orders->sum('quantity')) }}
@forelse($menuItems as $item) @if($item->variations->count() > 0) @foreach($item->variations as $variation) @php $variationOrders = $item->orders->where('menu_item_variation_id', $variation->id); $quantitySold = $variationOrders->sum('quantity') ?? 0; $totalAmount = $variationOrders->sum('amount') ?? 0; $averagePrice = $quantitySold > 0 ? ($totalAmount / $quantitySold) : $variation->price; @endphp @if($quantitySold > 0) @endif @endforeach @else @php $quantitySold = $item->orders->sum('quantity'); $totalAmount = $item->orders->sum('amount'); $averagePrice = $quantitySold > 0 ? ($totalAmount / $quantitySold) : $item->price; @endphp @if($quantitySold > 0) @endif @endif @empty @endforelse @if($menuItems->isNotEmpty()) @endif
Item Name Category Quantity Sold Selling Price Total Revenue
{{ $item->item_name }} ({{ $variation->variation }}) {{ $item->category->category_name ?? '' }} {{ $quantitySold }} {{ currency_format($averagePrice, $currencyId) }} {{ currency_format($totalAmount, $currencyId) }}
{{ $item->item_name }} {{ $item->category->category_name ?? '' }} {{ $quantitySold }} {{ currency_format($averagePrice, $currencyId) }} {{ currency_format($totalAmount, $currencyId) }}
No items sold during this period
TOTAL {{ $menuItems->sum(fn($item) => $item->orders->sum('quantity')) }} - {{ currency_format($menuItems->sum(fn($item) => $item->orders->sum(fn($order) => $order->amount)), $currencyId) }}