@if($requisition->type == 'TRIP_ON_ROAD_EXPENSE_REQUISITIONS')
@if(sizeof($current_agent['cash_requisition_item_descriptions']) >= 1)
S/N |
Truck |
Driver |
Allocation |
Destination |
Description
|
TOTAL |
|
@foreach($current_agent['requested_accounts'] as $requested_account)
{{$requested_account->name}} |
@endforeach
@foreach($current_agent['requested_items'] as $requested_item)
@if(!in_array($requested_item->name, $item_array))
{{$requested_item->name}} |
@endif
@endforeach
Narration |
@forelse ($requisition->requisition_currencies as $requisition_currency)
{{\App\Logistics\Facades\Logistics::getCurrencySign($requisition_currency)}} |
@empty
TSH |
@endforelse
{{--*/ $total_amount = 0 /*--}}
{{--*/ $total_amount_usd = 0 /*--}}
{{--*/ $total_amount_tsh = 0 /*--}}
@foreach($current_agent['cash_requisition_item_descriptions'] as $index=>$route_assignment)
{{--*/ $loading_order_item = $route_assignment->loadingOrderItem /*--}}
{{--*/ $vehicle_id = $loading_order_item->vehicle_id /*--}}
{{++$index}} |
{{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} |
{{$loading_order_item->loadingOrderVehicle->driver->driver}} |
{{$loading_order_item->loading_order_id != null ? $loading_order_item->LoadingOrder->client->code : 'PIPE-LINE'}} |
{{$loading_order_item->loading_order_id != null ? $loading_order_item->loadingOrderDestination->city->name : 'N/A'}} |
{{--*/ $sub_total = 0 /*--}}
{{--*/ $sub_total_usd = 0 /*--}}
{{--*/ $sub_total_tsh = 0 /*--}}
{{--*/ $currency = 'TSH' /*--}}
@if(sizeof($current_agent['requested_accounts']) > 0)
@foreach($current_agent['requested_accounts'] as $requested_account)
{{--*/ $amount = \App\Logistics\Facades\Logistics::currencyConvert($route_assignment->getAmount($requested_account->account->id),
$route_assignment->getCurrency($requested_account->account->id),
$requisition->RequisitionDrAccount->exchange_rate,
$requisition->RequisitionDrAccount->currency) /*--}}
{{--*/ $currency = ($requested_account->account->id == 93)?'USD':$route_assignment->getCurrency($requested_account->account->id) /*--}}
@if($route_assignment->getAmount($requested_account->account->id))
{{-- {{\App\Logistics\Facades\Logistics::getCurrencySign($route_assignment->getCurrency($requested_account->account->id))}} {{number_format($route_assignment->getAmount($requested_account->account->id))}}--}}
{{\App\Logistics\Facades\Logistics::getCurrencySign($currency)}} {{number_format($route_assignment->getAmount($requested_account->account->id))}}
@endif
|
{{--*/ $sub_total += $amount /*--}}
{{--@if($route_assignment->getCurrency($requested_account->account->id) == 'USD')--}}
@if($currency == 'USD')
{{--*/ $sub_total_usd += $route_assignment->getAmount($requested_account->account->id) /*--}}
@else
{{--*/ $sub_total_tsh += $route_assignment->getAmount($requested_account->account->id) /*--}}
@endif
{{--*/ $sub_total_[$requested_account->account->id][] = $route_assignment->getAmount($requested_account->account->id) /*--}}
@endforeach
@endif
@foreach($current_agent['requested_items'] as $requested_item)
@if($route_assignment->requisition_item_id == $requested_item->requisition_item_id)
{{\App\Logistics\Facades\Logistics::getCurrencySign($currency)}} {{number_format($requested_item->quantity)}} @ {{number_format($requested_item->rate)}}
|
@endif
@endforeach
{{$route_assignment->remarks}} |
@forelse ($requisition->requisition_currencies as $requisition_currency)
{{number_format($route_assignment->getAmountByCurrency($requisition_currency) + $sub_total_from_items)}} |
@empty
{{number_format($route_assignment->getAmountByCurrency($currency) + $sub_total_from_items)}} |
@endforelse
{{--*/ $total_amount += $sub_total /*--}}
{{--*/ $total_amount_usd += $sub_total_usd /*--}}
{{--*/ $total_amount_tsh += $sub_total_tsh /*--}}
@endforeach
{{--*/ $total_amount_from_this_requisition = $requisition->getTotalAmount($current_agent['currency'],$current_agent['exchange_rate']) /*--}}
TOTAL |
@forelse ($requisition->requisition_currencies as $requisition_currency)
{{number_format($requisition->getTotalAmountByCurrency($requisition_currency)+$total_from_items)}} |
@empty
{{number_format($total_amount_from_this_requisition+$total_from_items)}} |
@endforelse
OVERALL AMOUNT IN {{$current_agent['currency']}}
| {{number_format($total_amount_from_this_requisition+$total_from_items)}} |
@else
|
TRIP DETAILS |
EXPENSE DESCRIPTION |
TOTAL |
S/N |
Truck |
Driver |
Allocation |
Destination |
Narrations |
Expenses |
Amount |
@foreach($requisition->requisition_currencies as $requisition_currency)
{{\App\Logistics\Facades\Logistics::getCurrencySign($requisition_currency)}} |
@endforeach
{{--*/ $total_amount = 0 /*--}}
{{--*/ $total_amount_usd = 0 /*--}}
{{--*/ $total_amount_tsh = 0 /*--}}
@foreach($current_agent['cash_requisition_item_descriptions'] as $index=>$route_assignment)
{{--*/ $loading_order_item = $route_assignment->loadingOrderItem /*--}}
{{--*/ $vehicle_id = $loading_order_item->vehicle_id /*--}}
{{--*/ $first = 0 /*--}}
@foreach($current_agent['requested_accounts'] as $key =>$requested_account)
@if($first == $key)
{{++$index}} |
{{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} |
{{$loading_order_item->loadingOrderVehicle->driver->full_name}} |
{{$loading_order_item->LoadingOrder->client->code}} |
{{$loading_order_item->loadingOrderDestination->city->name}} |
{{$route_assignment->remarks}} |
@endif
{{--*/ $sub_total = 0 /*--}}
{{--*/ $sub_total_usd = 0 /*--}}
{{--*/ $sub_total_tsh = 0 /*--}}
{{--*/ $amount = \App\Logistics\Facades\Logistics::currencyConvert($route_assignment->getAmount($requested_account->account->id),
$route_assignment->getCurrency($requested_account->account->id),
$requisition->RequisitionDrAccount->exchange_rate,
$requisition->RequisitionDrAccount->currency) /*--}}
{{--*/ $sub_total += $amount /*--}}
{{--
--}}
@if($route_assignment->getAmount($requested_account->account->id))
{{--*/ $currency = ($requested_account->account->id == 93)?'USD':$route_assignment->getCurrency($requested_account->account->id) /*--}}
{{$requested_account->name}} |
{{\App\Logistics\Facades\Logistics::getCurrencySign($currency)}} {{number_format($route_assignment->getAmount($requested_account->account->id))}} |
@endif
@if($currency == 'USD')
{{--*/ $sub_total_usd += $route_assignment->getAmount($requested_account->account->id) /*--}}
@else
{{--*/ $sub_total_tsh += $route_assignment->getAmount($requested_account->account->id) /*--}}
@endif
{{--*/ $sub_total_[$requested_account->account->id][] = $route_assignment->getAmount($requested_account->account->id) /*--}}
@if(count($current_agent['requested_accounts']))
@foreach($requisition->requisition_currencies as $requisition_currency)
{{number_format($route_assignment->getAmountByCurrency($requisition_currency))}} |
@endforeach
@else
@if($first == $key)
@foreach($requisition->requisition_currencies as $requisition_currency)
|
@endforeach
@endif
@if(sizeof($current_agent['requested_accounts']) == ($key+1))
@foreach($requisition->requisition_currencies as $requisition_currency)
{{number_format($route_assignment->getAmountByCurrency($requisition_currency))}} |
@endforeach
@endif
@endif
{{--*/ $total_amount += $sub_total /*--}}
{{--*/ $total_amount_usd += $sub_total_usd /*--}}
{{--*/ $total_amount_tsh += $sub_total_tsh /*--}}
@endforeach
@endforeach
TOTAL |
@foreach($requisition->requisition_currencies as $requisition_currency)
{{number_format($requisition->getTotalAmountByCurrency($requisition_currency))}} |
@endforeach
{{--*/ $total_amount_from_this_requisition = $requisition->getTotalAmount($current_agent['currency'],$current_agent['exchange_rate']) /*--}}
TOTAL
AMOUNT IN {{$current_agent['currency']}}
| {{number_format($requisition->getTotalAmount($current_agent['currency'],
$current_agent['exchange_rate']))}} |
OVERALL AMOUNT IN {{$current_agent['currency']}}
| {{number_format($total_amount_from_this_requisition)}} |
@endif
@foreach($requisition->requisitionItems as $index=>$requisition_item)
@if($requisition_item->requisitionItemItem)
{{$requisition_item->currency}} |
@endif
@if($requisition_item->requisitionItemAccount)
@endif
@endforeach
@elseif($requisition->type == 'TRIP_LOADING_EXPENSES_REQUISITIONS')
@if(sizeof($current_agent['cash_requisition_item_descriptions']) >= 1)
S/N |
Truck |
Driver |
Allocation |
Destination |
Description
|
TOTAL |
|
@foreach($current_agent['requested_accounts'] as $requested_account)
{{$requested_account->name}} |
@endforeach
@foreach($current_agent['requested_items'] as $requested_item)
@if(!in_array($requested_item->name, $item_array))
{{$requested_item->name}} |
@endif
@endforeach
Narration |
@forelse ($requisition->requisition_currencies as $requisition_currency)
{{\App\Logistics\Facades\Logistics::getCurrencySign($requisition_currency)}} |
@empty
TSH |
@endforelse
{{--*/ $total_amount = 0 /*--}}
{{--*/ $total_amount_usd = 0 /*--}}
{{--*/ $total_amount_tsh = 0 /*--}}
@foreach($current_agent['cash_requisition_item_descriptions'] as $index=>$route_assignment)
{{--*/ $loading_order_item = $route_assignment->loadingOrderItem /*--}}
{{--*/ $vehicle_id = $loading_order_item->vehicle_id /*--}}
{{++$index}} |
{{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} |
{{$loading_order_item->loadingOrderVehicle->driver->driver}} |
{{$loading_order_item->loading_order_id != null ? $loading_order_item->LoadingOrder->client->code : 'PIPE-LINE'}} |
{{$loading_order_item->loading_order_id != null ? $loading_order_item->loadingOrderDestination->city->name : 'N/A'}} |
{{--*/ $sub_total = 0 /*--}}
{{--*/ $sub_total_usd = 0 /*--}}
{{--*/ $sub_total_tsh = 0 /*--}}
{{--*/ $currency = 'TSH' /*--}}
@if(sizeof($current_agent['requested_accounts']) > 0)
@foreach($current_agent['requested_accounts'] as $requested_account)
{{--*/ $amount = \App\Logistics\Facades\Logistics::currencyConvert($route_assignment->getAmount($requested_account->account->id),
$route_assignment->getCurrency($requested_account->account->id),
$requisition->RequisitionDrAccount->exchange_rate,
$requisition->RequisitionDrAccount->currency) /*--}}
{{--*/ $currency = ($requested_account->account->id == 93)?'USD':$route_assignment->getCurrency($requested_account->account->id) /*--}}
@if($route_assignment->getAmount($requested_account->account->id))
{{-- {{\App\Logistics\Facades\Logistics::getCurrencySign($route_assignment->getCurrency($requested_account->account->id))}} {{number_format($route_assignment->getAmount($requested_account->account->id))}}--}}
{{\App\Logistics\Facades\Logistics::getCurrencySign($currency)}} {{number_format($route_assignment->getAmount($requested_account->account->id))}}
@endif
|
{{--*/ $sub_total += $amount /*--}}
{{--@if($route_assignment->getCurrency($requested_account->account->id) == 'USD')--}}
@if($currency == 'USD')
{{--*/ $sub_total_usd += $route_assignment->getAmount($requested_account->account->id) /*--}}
@else
{{--*/ $sub_total_tsh += $route_assignment->getAmount($requested_account->account->id) /*--}}
@endif
{{--*/ $sub_total_[$requested_account->account->id][] = $route_assignment->getAmount($requested_account->account->id) /*--}}
@endforeach
@endif
@foreach($current_agent['requested_items'] as $requested_item)
@if($route_assignment->requisition_item_id == $requested_item->requisition_item_id)
{{\App\Logistics\Facades\Logistics::getCurrencySign($currency)}} {{number_format($requested_item->quantity)}} @ {{number_format($requested_item->rate)}}
|
@endif
@endforeach
{{$route_assignment->remarks}} |
@forelse ($requisition->requisition_currencies as $requisition_currency)
{{number_format($route_assignment->getAmountByCurrency($requisition_currency) + $sub_total_from_items)}} |
@empty
{{number_format($route_assignment->getAmountByCurrency($currency) + $sub_total_from_items)}} |
@endforelse
{{--*/ $total_amount += $sub_total /*--}}
{{--*/ $total_amount_usd += $sub_total_usd /*--}}
{{--*/ $total_amount_tsh += $sub_total_tsh /*--}}
@endforeach
{{--*/ $total_amount_from_this_requisition = $requisition->getTotalAmount($current_agent['currency'],$current_agent['exchange_rate']) /*--}}
TOTAL |
@forelse ($requisition->requisition_currencies as $requisition_currency)
{{number_format($requisition->getTotalAmountByCurrency($requisition_currency)+$total_from_items)}} |
@empty
{{number_format($total_amount_from_this_requisition+$total_from_items)}} |
@endforelse
OVERALL AMOUNT IN {{$current_agent['currency']}}
| {{number_format($total_amount_from_this_requisition+$total_from_items)}} |
@else
|
TRIP DETAILS |
EXPENSE DESCRIPTION |
TOTAL |
S/N |
Truck |
Driver |
Allocation |
Destination |
Narrations |
Expenses |
Amount |
@foreach($requisition->requisition_currencies as $requisition_currency)
{{\App\Logistics\Facades\Logistics::getCurrencySign($requisition_currency)}} |
@endforeach
{{--*/ $total_amount = 0 /*--}}
{{--*/ $total_amount_usd = 0 /*--}}
{{--*/ $total_amount_tsh = 0 /*--}}
@foreach($current_agent['cash_requisition_item_descriptions'] as $index=>$route_assignment)
{{--*/ $loading_order_item = $route_assignment->loadingOrderItem /*--}}
{{--*/ $vehicle_id = $loading_order_item->vehicle_id /*--}}
{{--*/ $first = 0 /*--}}
@foreach($current_agent['requested_accounts'] as $key =>$requested_account)
@if($first == $key)
{{++$index}} |
{{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} |
{{$loading_order_item->loadingOrderVehicle->driver->full_name}} |
{{$loading_order_item->LoadingOrder->client->code}} |
{{$loading_order_item->loadingOrderDestination->city->name}} |
{{$route_assignment->remarks}} |
@endif
{{--*/ $sub_total = 0 /*--}}
{{--*/ $sub_total_usd = 0 /*--}}
{{--*/ $sub_total_tsh = 0 /*--}}
{{--*/ $amount = \App\Logistics\Facades\Logistics::currencyConvert($route_assignment->getAmount($requested_account->account->id),
$route_assignment->getCurrency($requested_account->account->id),
$requisition->RequisitionDrAccount->exchange_rate,
$requisition->RequisitionDrAccount->currency) /*--}}
{{--*/ $sub_total += $amount /*--}}
{{--
--}}
@if($route_assignment->getAmount($requested_account->account->id))
{{--*/ $currency = ($requested_account->account->id == 93)?'USD':$route_assignment->getCurrency($requested_account->account->id) /*--}}
{{$requested_account->name}} |
{{\App\Logistics\Facades\Logistics::getCurrencySign($currency)}} {{number_format($route_assignment->getAmount($requested_account->account->id))}} |
@endif
@if($currency == 'USD')
{{--*/ $sub_total_usd += $route_assignment->getAmount($requested_account->account->id) /*--}}
@else
{{--*/ $sub_total_tsh += $route_assignment->getAmount($requested_account->account->id) /*--}}
@endif
{{--*/ $sub_total_[$requested_account->account->id][] = $route_assignment->getAmount($requested_account->account->id) /*--}}
@if(count($current_agent['requested_accounts']))
@foreach($requisition->requisition_currencies as $requisition_currency)
{{number_format($route_assignment->getAmountByCurrency($requisition_currency))}} |
@endforeach
@else
@if($first == $key)
@foreach($requisition->requisition_currencies as $requisition_currency)
|
@endforeach
@endif
@if(sizeof($current_agent['requested_accounts']) == ($key+1))
@foreach($requisition->requisition_currencies as $requisition_currency)
{{number_format($route_assignment->getAmountByCurrency($requisition_currency))}} |
@endforeach
@endif
@endif
{{--*/ $total_amount += $sub_total /*--}}
{{--*/ $total_amount_usd += $sub_total_usd /*--}}
{{--*/ $total_amount_tsh += $sub_total_tsh /*--}}
@endforeach
@endforeach
TOTAL |
@foreach($requisition->requisition_currencies as $requisition_currency)
{{number_format($requisition->getTotalAmountByCurrency($requisition_currency))}} |
@endforeach
{{--*/ $total_amount_from_this_requisition = $requisition->getTotalAmount($current_agent['currency'],$current_agent['exchange_rate']) /*--}}
TOTAL
AMOUNT IN {{$current_agent['currency']}}
| {{number_format($requisition->getTotalAmount($current_agent['currency'],
$current_agent['exchange_rate']))}} |
OVERALL AMOUNT IN {{$current_agent['currency']}}
| {{number_format($total_amount_from_this_requisition)}} |
@endif
@foreach($requisition->requisitionItems as $index=>$requisition_item)
@if($requisition_item->requisitionItemItem)
{{$requisition_item->currency}} |
@endif
@if($requisition_item->requisitionItemAccount)
@endif
@endforeach
@elseif($requisition->type == 'SAFARI_ALLOWANCE_REQUISITION')
@elseif($requisition->type == 'FUEL_REQUISITIONS')
@elseif($requisition->type == 'JOB_CARD_REQUISITION')
@elseif($requisition->type == 'PREPAID_EXPENSES_REQUISITIONS')
S/N |
Vehicle # |
Issued Date |
Expiry Date |
Status |
Ref # |
Amount |
|
{{--*/ $total_amount = 0 /*--}}
{{--*/ $total_amount_usd = 0 /*--}}
{{--*/ $total_amount_tsh = 0 /*--}}
{{--*/ $sub_total_usd = 0 /*--}}
{{--*/ $sub_total_tsh = 0 /*--}}
{{--*/ $sub_total = 0 /*--}}
{{--*/ $exchange_rate = 2250 /*--}}
{{--*/ $currency = 'TSH' /*--}}
{{sizeof($requisition_item_descriptions)}}
@foreach($requisition_item_descriptions as $index=>$requisition_item_description)
@if($expense_request_status == 'COMPLETE')
{{++$index}} |
{{$requisition_item_description->permitable->registration_number}}
|
{{\Carbon\Carbon::parse($requisition_item_description->issue_date)->toFormattedDateString()}}
|
{{\Carbon\Carbon::parse($requisition_item_description->expire_date)->toFormattedDateString()}}
|
Renewed |
{{$requisition_item_description->issue_no}}
|
{{$requisition_item_description->currency}} {{number_format($requisition_item_description->rate)}}
|
{{--*/ $sub_total += $requisition_item_description->rate /*--}}
{{-- --}}
|
@endif
@if($expense_request_status == 'PARTIALY_COMPLETE')