Report Parameters
Report Parameters

@error('selectedBranch') {{ $message }} @enderror @if($branchSearchVisible == true)
  • @foreach($branches as $branch) @endforeach
@endif
@error('start_date') {{ $message }} @enderror
@error('end_date') {{ $message }} @enderror
@error('dineType') {{ $message }} @enderror
Generating Report..
{{-- --}}
Transactions Per Hour (Day of Week Consolidated)
{{isset($selectedBranch) ? $selectedBranch : ''}}
@if($dineType != 'ALL')
{{ $dineType == 'TO' ? '(TAKE-OUT ONLY)' : '(DINE-IN ONLY)'}}
@endif
Report Date: {{ date('M j, Y g:i:s a',strtotime(now()))}} Generated By: {{ auth()->user()->name}}
Coverage: {{date('M j, Y',strtotime($start_date))}} - {{date('M j, Y',strtotime($end_date))}}
*Note: Coverage date is based on Transaction Date.
@for ($i = 0; $i <= 23; $i++) @endfor {{-- @forelse ($transactions_per_hour_counts as $index => $d) @if($d > 0) @endif @empty @endforelse --}}
Hour Sun Mon Tue Wed Thu Fri Sat
Hour {{ $i }}:00 - {{ $i }}:59 {{$transactions_per_hour_counts[0][$i]}} {{$transactions_per_hour_counts[1][$i]}} {{$transactions_per_hour_counts[2][$i]}} {{$transactions_per_hour_counts[3][$i]}} {{$transactions_per_hour_counts[4][$i]}} {{$transactions_per_hour_counts[5][$i]}} {{$transactions_per_hour_counts[6][$i]}}
Hour {{ $index }}:00 {{$d}}
@php $filteredQuantity = array_filter($transactions_per_hour_counts, function ($value) { return $value !== 0; }); function findMaxValueIndex($array) { $maxValue = max($array); if($maxValue == 0) return []; return array_keys($array,$maxValue); } $peaks = findMaxValueIndex($transactions_per_hour_counts); @endphp
Min: {{ count($filteredQuantity) > 0 ?min($filteredQuantity) : '0'}}
Max: {{ count($filteredQuantity) > 0 ? max($filteredQuantity) : '0'}}
Peak Hour:
@forelse($peaks as $peak) Hour {{$peak.':00'}}@if(!$loop->last), @endif @empty None @endforelse
@push('custom-scripts') @endpush