@section('pageTitle',$this->branch_name.' Gross Breakdown')

{{$this->branch_name}} Gross Breakdown

@forelse($data as $index => $d) @empty @for($m = 1; $m <= 12; $m++) @endfor @endforelse @if(!empty($data)) @else @endif {{-- @if(!empty($data)) @php $rank = 0; @endphp @forelse($data->where('type','Cafeteria') as $d) @php $rank++ @endphp @empty @endforelse --}} {{-- --}} {{-- @else @for($m = 1; $m <= 12; $m++) @endfor --}} {{-- @endif --}}
Transaction Date Gross
{{ $index + 1 }} {{ date('F j, Y - D',strtotime($d->t_date))}} {{isset($d->s_gross_amount) ? number_format($d->s_gross_amount,2) : '0.00'}}
TOTAL {{ number_format($data->sum('s_gross_amount'),2)}}
TOTAL
{{ $rank }} {{ $d->branch_code.': '.$d->branch_name }} {{isset($d->total_gross) ? number_format($d->total_gross,2) : '0.00'}}
TOTAL {{ number_format($data->where('type','Cafeteria')->sum('total_gross'),2)}}
TOTAL