@extends('layouts.main', ['title' => 'ROUTE BUDGETING']) @section('title') ROUTE BUDGETING @stop @section('navigation') @stop @section('msghead_menu')@endsection @section('contentinner') {{--*/ $exchange_rate = 2200 /*--}} {{--*/ $general_total = 0 /*--}} {{--*/ $cost_total_usd = 0 /*--}}

GENERAL EXPENSES

{{--
--}} {{----}} {{--
--}}
@foreach($route->routeBorders as $route_border)

{{$route_border->border->name}}

@foreach($route_border->expenses as $border_expense) @endforeach
Expenses Currency Amount Action
{{$border_expense->account->name}} {{$border_expense->currency}} {{number_format($border_expense->amount, 2)}}
@endforeach
@if(sizeof($permits))
@foreach($permits as $permit) @endforeach
Insurances/Permits/Licences
Name Border
{{$permit->name}} hasPermit($permit->id)?"checked":"" !!} value="{{$permit->id}}"/>
@endif

@foreach($route->routeForecastingExpenses as $route_forecasting_expense) @endforeach
Name Cargo Type Currency Amount Descriptions Action
{{$route_forecasting_expense->account->name}} {{$route_forecasting_expense->cargo_type}} {{$route_forecasting_expense->currency}} {{$route_forecasting_expense->amount}} {{$route_forecasting_expense->descriptions}}
@foreach($company_cargo_types as $company_cargo_type)

{{ucwords($company_cargo_type->name)}}

{{--*/ $type = $company_cargo_type->type /*--}} {{--*/ $cost_total = $general_total /*--}} {{--*/ $permits = \App\Model\Permit::where('type',$type)->get() /*--}}
{{--
--}}

@foreach($route->routeExpenses()->whereIn('cargo_type',[$type])->get() as $route_expense) {{--*/ $cost_total += $route_expense->amount /*--}} @endforeach
Expenses Account Currency Amount  
{{$route_expense->cost_name}} {{$route_expense->currency}} {{number_format($route_expense->amount)}}

 
@if(sizeof($permits))
@foreach($permits as $permit) @endforeach
Insurances/Permits/Licences
Name Border
{{$permit->name}} hasPermit($permit->id)?"checked":"" !!} value="{{$permit->id}}"/>
@endif @if(sizeof($route_cargo_detail->routeReturningCargoDetails)>0) {{--*/ $i=1 /*--}} @foreach($route_cargo_detail->routeReturningCargoDetails as $index=> $route_returning_cargo_detail) {{--*/ $tab_number=2+$i /*--}}

@foreach($route_returning_cargo_detail->returnExpenses as $return_expense) @endforeach
Name Currency Amount Descriptions Action
{{$return_expense->account->name}} {{$return_expense->currency}} {{$return_expense->amount}} {{$return_expense->descriptions}}
{{--*/ $i++ /*--}} @endforeach @endif
@endforeach @stop