{{$campany->company_name}}

Address: {{$campany->company_address}}, {{$campany->city}}, Tanzania
Mob: {{$campany->compny_phone}}
Email: {{$campany->company_email}}

ROUTE EXPENSES REPORT


@foreach($expenses as $expense) @endforeach @foreach($expenses as $expense) @endforeach {{--*/ $total_tsh = 0 /*--}} {{--*/ $total_usd = 0 /*--}} {{--*/ $overall_total_usd = 0 /*--}} {{--*/ $overall_total_tsh = 0 /*--}} {{--*/ $overall_expense = [] /*--}} @foreach($routes as $index=> $route) {{--@if($route->invoices->count() >0)--}} @foreach($expenses as $expense) @if ($expense->id == 1) @else @if($route->costAmount($expense->id) == 'N/A') @else @if($route->costAmount($expense->id)->currency == 'TSH') {{--*/ $total_tsh += $route->costAmount($expense->id)->amount /*--}} {{--*/ $overall_expense['tsh'][$expense->id][] = $route->costAmount($expense->id)->amount /*--}} @else {{--*/ $overall_expense['tsh'][$expense->id][] = 0 /*--}} @endif @if($route->costAmount($expense->id)->currency == 'USD') {{--*/ $total_usd += $route->costAmount($expense->id)->amount /*--}} {{--*/ $overall_expense['usd'][$expense->id][] = $route->costAmount($expense->id)->amount /*--}} @else {{--*/ $overall_expense['usd'][$expense->id][] = 0 /*--}} @endif @endif @endif @endforeach {{--*/ $overall_total_usd += $total_usd /*--}} {{--*/ $total_usd = 0 /*--}} {{--*/ $overall_total_tsh += $total_tsh /*--}} {{--*/ $total_tsh = 0 /*--}} {{--@endif--}} @endforeach @foreach($expenses as $expense) @if ($expense->id == 1) @else @if($route->costAmount($expense->id) == 'N/A') @else @endif @endif @endforeach
SNO. DATE TRUCK / TRAILER DESTINATION{{$expense->costName}}Total
TSH USDTSH USD
{{++$index}} {{ \Carbon\Carbon::parse($route->departure_date)->toFormattedDateString()}} {{ $route->vehicle}} /{{ $route->getVehicle()->getCurrentTrailer()->registration_number}} {{$route->route}} {{$route->costAmount($expense->id)}} {{number_format($route->costAmount($expense->id)->amount,2)}}{{number_format(0,2)}}{{number_format($route->costAmount($expense->id)->amount,2)}}{{number_format(0,2)}}{{number_format($total_tsh,2)}} {{number_format($total_usd,2)}}
Total Expenses{{$route->costAmount($expense->id)}} {{number_format(array_sum($overall_expense['tsh'][$expense->id]),2)}} {{number_format(array_sum($overall_expense['usd'][$expense->id]),2)}}{{number_format($overall_total_tsh,2)}} {{number_format($overall_total_usd,2)}}