@foreach($items as $client_inquiry_item)
{{--*/ $route = $client_inquiry_item->getRoute() /*--}}
@if($route)
{{--*/ $route_cargo_details =$route->routeCargoDetails() /*--}}
{{--*/ $route_cargo_detail = $route_cargo_details->whereType($client_inquiry_item->cargo_type)->first() /*--}}
@else
{{--*/ $route_cargo_detail = [] /*--}}
@endif
|
is_returning)?2:1 !!}" style="text-align: center"> {{$client_inquiry_item->clientInquiryItemOffloadingPoint->city->name}} - {!! $client_inquiry_item->product_name !!} |
@if($client_inquiry_item->cargo_type =="LOOSE_CARGO")
|
@endif
|
Semi |
@if($client_inquiry_item->cargo_type =='TANKERS')
Pully |
@endif
@if($client_inquiry_item->cargo_type =="LOOSE_CARGO" && $route_cargo_detail->is_returning)
Return Cargo |
@endif
|
Exchange Rate |
{!! number_format($client_inquiry_item->exchange_rate) !!}
|
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->exchange_rate) !!} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{!! number_format($client_inquiry_item->exchange_rate) !!} |
{{--@endforeach--}}
@endif
|
Loading Point |
{{$client_inquiry_item->clientInquiryItemLoadingPoint->city->name}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{$client_inquiry_item->clientInquiryItemLoadingPoint->city->name}} |
@endif
@if($route_cargo_detail->is_returning)
{{--@foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{{$route_cargo_detail->routeReturningCargoDetails->first()->loadingCity->name}} |
{{--@endforeach--}}
@endif
|
Country |
{{$client_inquiry_item->clientInquiryItemOffloadingPoint->city->country->name}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{$client_inquiry_item->clientInquiryItemOffloadingPoint->city->country->name}} |
@endif
@if($route_cargo_detail->is_returning)
{{--@foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{{$route_cargo_detail->routeReturningCargoDetails->first()->loadingCity->country->name}} |
{{--@endforeach--}}
@endif
|
Destination |
{{$client_inquiry_item->clientInquiryItemOffloadingPoint->city->name}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{$client_inquiry_item->clientInquiryItemOffloadingPoint->city->name}} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
DAR ES SALAAM |
{{--@endforeach--}}
@endif
|
KM |
{{($route_cargo_detail->is_returning)?number_format($route->go_distance): number_format($route->go_distance*2)}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{number_format($route->go_distance*2)}} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{{number_format($route_cargo_detail->routeReturningCargoDetails->first()->getKm())}}
|
{{--@endforeach--}}
@endif
|
Rate/MT |
{{ ($client_inquiry_item->rate_for =='TRIP')? "" : $client_inquiry_item->rate * $client_inquiry_item->tonnage }} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{ ($client_inquiry_item->rate_for =='TRIP')? "" : $client_inquiry_item->rate * $client_inquiry_item->tonnage }} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
|
{{--@endforeach--}}
@endif
|
Rate/Trip |
{{--*/ $rate = ($client_inquiry_item->rate_for == "TRIP")? $client_inquiry_item->rate:$client_inquiry_item->rate*$client_inquiry_item->standard_semi_tonnage /*--}}
{{number_format($rate)}}
|
@if($client_inquiry_item->cargo_type =='TANKERS')
{{--*/ $rate = ($client_inquiry_item->rate_for == "TRIP")? $client_inquiry_item->rate:$client_inquiry_item->rate*$client_inquiry_item->standard_pully_tonnage /*--}}
{{number_format($rate)}}
{{-- {{number_format($client_inquiry_item->standard_pully_tonnage*$client_inquiry_item->rate)}}--}}
|
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
|
{{--@endforeach--}}
@endif
|
Fuel(Ltr) |
{{$route->getFuel($client_inquiry_item->cargo_type)}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{$route->getFuel($client_inquiry_item->cargo_type)}} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{{$route_cargo_detail->routeReturningCargoDetails->first()->getFuel()}} |
{{--@endforeach--}}
@endif
|
Fuel Rate/Ltr |
{!! number_format($client_inquiry_item->fuel_rate) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->fuel_rate) !!} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{!! number_format($route_cargo_detail->routeReturningCargoDetails->first()->fuel_rate) !!}
|
{{--@endforeach--}}
@endif
|
Expected days |
{{$route->getDays($client_inquiry_item->cargo_type)}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{$route->getDays($client_inquiry_item->cargo_type)}} |
@endif
@if($route_cargo_detail->is_returning)
{{-- @foreach($route_cargo_detail->routeReturningCargoDetails as $route_returning_cargo_detail)--}}
{{$route_cargo_detail->routeReturningCargoDetails->first()->getDays()}} |
{{--@endforeach--}}
@endif
|
@if($route_cargo_detail->is_returning)
|
@endif
is_returning)?2:1 !!}">Loading Points Expenses |
{{-- --}}
|
@if($route_cargo_detail->is_returning)
|
@endif
@foreach($client_inquiry_item->loading_expenses as $l)
|
{!! $l->expense !!} |
{!! number_format($l->amount) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($l->amount) !!} |
@endif
@if($route_cargo_detail->is_returning)
{{number_format(($route_cargo_detail->routeReturningCargoDetails->first()->getExpenses($l->account_id)))}} |
@endif
@endforeach
is_returning )?2:1 !!}">Route Border Expenses |
|
@if($route_cargo_detail->is_returning)
|
@endif
@foreach($client_inquiry_item->border_expenses as $b)
|
{!! $b->expense !!} |
{!! number_format($b->amount) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($b->amount) !!} |
@endif
@if($route_cargo_detail->is_returning)
{{number_format(($route_cargo_detail->routeReturningCargoDetails->first()->getExpenses($b->account_id)))}} |
@endif
@endforeach
is_returning)?2:1 !!}">Route Forecasting Expenses |
|
@foreach($client_inquiry_item->forecasting_expenses as $l)
|
{!! $l->expense !!} |
{!! number_format($l->amount) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($l->amount) !!} |
@endif
@if($route_cargo_detail->is_returning)
{{number_format(($route_cargo_detail->routeReturningCargoDetails->first()->getExpenses($l->account_id)))}} |
@endif
@endforeach
is_returning)?2:1 !!}">Driver Expenses |
|
@foreach($client_inquiry_item->route_expenses as $route_expense)
|
{{$route_expense->expense}} |
{{number_format($route_expense->amount,2)}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{number_format($route_expense->amount,2)}} |
@endif
@if($route_cargo_detail->is_returning)
{{number_format(($route_cargo_detail->routeReturningCargoDetails->first()->getExpenses($route_expense->account_id)))}} |
@endif
@endforeach
@foreach($client_inquiry_item->other_operating_expenses as $o)
|
{!! $o->expense !!} |
{{number_format($o->amount,2)}} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{{number_format($o->amount,2)}} |
@endif
@if($route_cargo_detail->is_returning)
{{number_format($o->return_amount ,2)}} |
@endif
@endforeach
is_returning)?2:1 !!}" style="text-align: right;">Total Operating Cost (USD) |
{!! number_format($client_inquiry_item->computed_values->total_operation_cost_usd) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->total_operation_cost_usd) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->total_return_operation_cost_usd) !!} |
@endif
is_returning)?2:1 !!}" style="text-align: right;">Contribution in USD |
{!! number_format($client_inquiry_item->computed_values->contribution_semi) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->contribution_pully) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->contribution_return_usd) !!} |
@endif
is_returning)?2:1 !!}">Route Fixed Expenses |
|
@if($route_cargo_detail->is_returning)
|
@endif
@foreach($client_inquiry_item->prepaid_expenses as $l)
|
{!! $l->expense!!} |
{!! number_format($l->amount)!!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($l->amount)!!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($l->amount)!!} |
@endif
@endforeach
@foreach($client_inquiry_item->fixed_expenses as $expense)
|
{!! $expense->expense !!} |
{!! number_format($expense->amount) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($expense->amount) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($expense->amount) !!} |
@endif
@endforeach
|
Total Fixed Cost(Tsh) |
{!! number_format($client_inquiry_item->computed_values->total_fixed_expenses) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->total_fixed_expenses) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->total_fixed_expenses) !!} |
@endif
|
Total Fixed Cost(USD) |
{!! number_format($client_inquiry_item->computed_values->total_fixed_expenses_usd) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->total_fixed_expenses_usd) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->total_fixed_expenses_usd) !!} |
@endif
|
is_returning)?2:1 !!}"> |
@if($route_cargo_detail->is_returning)
|
@endif
|
Net Profit in USD |
{!! number_format($client_inquiry_item->computed_values->net_profit_usd_semi) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->net_profit_usd_pully) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->net_profit_usd_return) !!} |
@endif
|
|
{!! number_format($client_inquiry_item->computed_values->net_profit_percentage_semi) !!}% |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->net_profit_percentage_pully) !!}% |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->net_profit_percentage_return) !!}% |
@endif
|
is_returning)?2:1 !!}"> |
@if($route_cargo_detail->is_returning)
|
@endif
is_returning)?2:1 !!}"> |
@if($route_cargo_detail->is_returning)
|
@endif
| Net Profit in USD |
{!! number_format($client_inquiry_item->computed_values->net_profit_usd_semi) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->net_profit_usd_pully) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->net_profit_usd_return) !!} |
@endif
| Add: Depreciation |
{!! number_format($client_inquiry_item->computed_values->depreciation_usd) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->depreciation_usd) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->depreciation_usd) !!} |
@endif
|
Cash Profit per Trip per {!! ($client_inquiry_item->cargo_type =='TANKERS')?"Tanker":"Truck" !!} |
{!! number_format($client_inquiry_item->computed_values->cash_profit_per_trip_per_tanker_semi) !!} |
@if($client_inquiry_item->cargo_type =='TANKERS')
{!! number_format($client_inquiry_item->computed_values->cash_profit_per_trip_per_tanker_pully) !!} |
@endif
@if($route_cargo_detail->is_returning)
{!! number_format($client_inquiry_item->computed_values->cash_profit_per_trip_per_truck_return) !!} |
@endif