@extends('layouts.main') @section('title') Route Profile:Cost @stop @section('contentinner')
@include('operations.route_assignments.includes.profile')

On Route other Cost Add Cost Print

{{--*/ $i = 1 /*--}} {{--*/ $n = 1 /*--}} {{--*/ $usdCost_total = 0 /*--}} {{--*/ $tshCost_total = 0 /*--}} @foreach($costs as $index => $cost) @if(($cost->currency == 'TSH') || ($cost->currency == 'Tsh')|| ($cost->currency == 'tsh')) @elseif(($cost->currency == 'USD') || $cost->currency == 'usd') @endif {{--*/ $i += 1 /*--}} {{--*/ $n += 1 /*--}} @endforeach
SN Cost Name Currancy Exchange Rate Cost Amount(Tsh) Cost Amount(USD) Action
{{$index+1}} {{$cost->cost->name}} {{$cost->currency}} {{$cost->exchange_rate}} {{number_format($cost->amount,2)}} {{number_format($cost->amount,2)}}
{{$n}} Fuel Tsh @if(empty($fuel_orders->amountValue)) {{number_format($routeassignment->fuel_required)}} litres @else {{number_format($fuel_orders->amountValue,2)}} ( or {{number_format($routeassignment->fuel_required)}} litres) {{--*/ $tshCost_total += $routeassignment->fuel_required*$fuel_orders->rate /*--}} @endif
Total Cost @if(empty($fuel_orders->amountValue)) {{number_format($tshCost_total)}} + {{number_format($routeassignment->fuel_required,2)}} litres @else {{number_format($tshCost_total,2)}} ( or {{number_format($tshCost_total - $routeassignment->fuel_required*$fuel_orders->rate)}} + {{number_format($routeassignment->fuel_required,2)}} litres) @endif {{number_format($usdCost_total,2)}}

@stop