{{--*/ $col_span = count($expenses) /*--}} {{--*/ $chunk_expeses = $expenses->chunk(ceil($expenses->count() / 2)) /*--}} {{--*/ $size = ceil(78/ceil($expenses->count() / 2)) /*--}} {{--*/ $total_col_span = sizeOf($chunk_expeses[0])+4 /*--}} @foreach($chunk_expeses as $index=>$chunk_expense) @if(!$index) @endif @foreach($chunk_expense as $expense) {{--*/ $daynamic_total_account[$expense->account_id] = [] /*--}} @endforeach @if(!$index) @endif @endforeach {{--*/ $total_tsh = 0 /*--}} {{--*/ $total_usd = 0 /*--}} {{--*/ $overall_total_usd = 0 /*--}} {{--*/ $overall_total_tsh = 0 /*--}} {{--*/ $overall_expense = [] /*--}} @foreach($company_performances as $index1=> $company_performance) {{--*/ $trip_total_expense = 0 /*--}} @foreach($chunk_expeses as $index=>$chunk_expense) @if(!$index) @endif @foreach($chunk_expense as $expense) {{--*/ $overall_total_tsh += $company_performance->getPaidAmount($expense->account_id) /*--}} {{--*/ $trip_total_expense += $company_performance->getPaidAmount($expense->account_id) /*--}} {{--*/ $daynamic_total_account[$expense->account_id][] = $company_performance->getPaidAmount($expense->account_id) /*--}} @endforeach @if($index == 0) @else @if(!(sizeof($chunk_expense)%2)) @endif @endif @endforeach @endforeach @foreach($chunk_expeses as $index=>$chunk_expense) @if(!$index) @endif @foreach($chunk_expense as $expense) @endforeach @if(!$index) @endif @endforeach
S/N Allocation #
Date
Truck #
Client
Loading
Destination
{{$expense->account}}Total (Tsh)
{{++$index1}} {{$company_performance->id}}
{{ \Carbon\Carbon::parse($company_performance->date)->format('M ,jS')}}
{{$company_performance->loadingOrderVehicle->vehicle->registration_number}}
{{$company_performance->client_code}}
{{$company_performance->loading_city}}
{{$company_performance->destination}}
{{number_format($company_performance->getPaidAmount($expense->account_id))}}{{number_format($trip_total_expense)}}
OVERALL TOTAL {{number_format(array_sum($daynamic_total_account[$expense->account_id]))}} {{number_format($overall_total_tsh)}}