@extends('dashboard.app') @section('content')
{{--
--}}


Weekly: {{ $from }} - {{ $to }}
@foreach($vendors as $vendor) @php($bookings = $vendor->stats()->getBookingDaysByRange($from, $to)) @endforeach
# Vendor Vendor category Stall Sales Report Sales Sales History Attendance
{{ $loop->index+1 }} {{ $vendor->name }} @foreach($vendor->info->categories as $category) {{ $category->name }} {{ !$loop->last ? "," : null }} @endforeach @foreach($bookings as $booking) @if($booking->stall) {{ $booking->stall->alias ?? null }} {!! !$loop->last ? "," : null !!} @endif @endforeach @foreach($bookings as $booking) @if( $booking->stall) @if($booking->getLastSales()) @else @endif {!! !$loop->last ? "," : null !!} @endif @endforeach @php( $total_sales = 0) @foreach($bookings as $booking) @if($booking->getLastSales()) @php($total_sales += $booking->getLastSales()->amount ) @endif @endforeach {!! $total_sales ? $total_sales."$" : "—" !!} @foreach($bookings as $booking) @if($booking->stall) @if($booking->attendans) {!! !$loop->last ? "," : null !!} @else {!! !$loop->last ? "," : null !!} @endif @endif @endforeach
@endsection @push('script') @endpush