{{$company->company_name}}

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

RETURN EXPENSES REQUISITION

{{----}} {{----}}
Requisition NO. : {{$requisition->id}}
Created By. : {{$requisition->initiator}}
Cost Centre : {{$requisition->request_for}}
Date : {{\Carbon\Carbon::parse($requisition->date)->toFormattedDateString()}} Status :--}} {{----}} {{--{{$requisition->status}}--}} {{----}} {{--
@if($requisition->id !=2)
PAYABLE ACCOUNT : {!! $payable['name'] !!}
{{--
BANK NAME :
--}}
OPEN BALANCE {{--({!! $payable['currency'] !!})--}} : {!! number_format($payable['amount'],2) !!}
@foreach($requested_accounts as $requested_account) @endforeach {{--*/ $total_amount = 0 /*--}} {{--*/ $total_amount_usd = 0 /*--}} {{--*/ $total_amount_tsh = 0 /*--}} @foreach($cash_requisition_item_descriptions as $index=>$route_assignment) {{--*/ $loading_order_item = $route_assignment->loadingOrderItem /*--}} {{--*/ $vehicle_id = $loading_order_item->vehicle_id /*--}} {{--*/ $sub_total = 0 /*--}} {{--*/ $sub_total_usd = 0 /*--}} {{--*/ $sub_total_tsh = 0 /*--}} @foreach($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) /*--}} {{--*/ $sub_total += $amount /*--}} @if($route_assignment->getCurrency($requested_account->account->id) == '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 {{--*/ $total_amount += $sub_total /*--}} {{--*/ $total_amount_usd += $sub_total_usd /*--}} {{--*/ $total_amount_tsh += $sub_total_tsh /*--}} @endforeach @foreach($requested_accounts as $requested_account) @endforeach
S/N Truck Driver Allocation Destination Description TOTAL
{{$requested_account->name}} USD TSH
{{++$index}} {{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} {{$loading_order_item->loadingOrderVehicle->driver->driver}} {{ $loading_order_item->LoadingOrder->client->code }} {{$loading_order_item->loadingOrderDestination->city->name}} {{number_format($route_assignment->getAmount($requested_account->account->id))}} {{number_format($sub_total_usd)}} {{number_format($sub_total_tsh)}}
{{number_format(array_sum($sub_total_[$requested_account->account->id])) }}{{number_format($total_amount_usd)}} {{number_format(round($total_amount_tsh/100)*100)}}
@elseif($requisition->id == 2)
PAYABLE ACCOUNT : {!! $payable['name'] !!}
{{--
BANK NAME :
--}}
OPEN BALANCE {{--({!! $payable['currency'] !!})--}} : {!! number_format($payable['amount'],2) !!}
@foreach($requested_accounts as $requested_account) @endforeach {{--*/ $total_amount = 0 /*--}} {{--*/ $total_amount_usd = 0 /*--}} {{--*/ $total_amount_tsh = 0 /*--}} @foreach($cash_requisition_item_descriptions as $index=>$route_assignment) {{--*/ $loading_order_item = $route_assignment->loadingOrderItem /*--}} {{--*/ $vehicle_id = $loading_order_item->vehicle_id /*--}} {{--*/ $sub_total = 0 /*--}} {{--*/ $sub_total1 = 0 /*--}} {{--*/ $sub_total_usd = 0 /*--}} {{--*/ $sub_total_tsh = 0 /*--}} {{--*/ $sub_total_tsh1 = 0 /*--}} @foreach($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) /*--}} {{----}} {{--*/ $sub_total += $amount /*--}} {{--*/ $sub_total1 += 1906*245 /*--}} @if($route_assignment->getCurrency($requested_account->account->id) == 'USD') {{--*/ $sub_total_usd += $route_assignment->getAmount($requested_account->account->id) /*--}} @else {{--*/ $sub_total_tsh += $route_assignment->getAmount($requested_account->account->id) /*--}} {{--*/ $sub_total_tsh1 += 1906*245 /*--}} @endif {{--*/ $sub_total_[$requested_account->account->id][] = $route_assignment->getAmount($requested_account->account->id) /*--}} {{--*/ $sub_total_1[$requested_account->account->id][] = 160 /*--}} @endforeach {{--*/ $total_amount += $sub_total1 /*--}} {{--*/ $total_amount_usd += $sub_total_usd /*--}} {{--*/ $total_amount_tsh += $sub_total_tsh1 /*--}} @endforeach @foreach($requested_accounts as $requested_account) @endforeach
S/N Truck Allocation Destination Description Fuel 160 litres @250 KM Fuel rate is 11.91 Kwacha per litre Conversion Rate TOTAL
{{$requested_account->name}} USD TSH
{{++$index}} {{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} {{$loading_order_item->LoadingOrder->client->code}} {{$loading_order_item->loadingOrderDestination->city->name}}{{number_format($route_assignment->getAmount($requested_account->account->id))}}{{number_format(160)}}1,906 245 {{number_format($sub_total_usd)}} {{number_format($sub_total_tsh1)}}
{{number_format(array_sum($sub_total_1[$requested_account->account->id])) }} {{number_format($total_amount_usd)}} {{number_format(round($total_amount_tsh/100)*100)}}
@endif {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{--
______________________
QHSEE/Operation
______________________
Snr. Acc
______________________
FC
______________________
GM
______________________
Managing Director
--}}