@if($payment_voucher->loadingOrderItemPaymentVoucher) {{--*/ $loading_order_item = $payment_voucher->loadingOrderItemPaymentVoucher->loadingOrderItem /*--}}
{{\App\Logistics\Facades\Logistics::generateInquiryNumber($loading_order_item)}}
@endif
{{$company->company_name}}
{{$company->company_address}}, {{$company->city}}, Tanzania
Mob: {{$company->compny_phone}}
Email: {{$company->company_email}}
PAYMENT VOUCHER
  NUMBER. {{str_pad($payment_voucher->id, 5, '0', STR_PAD_LEFT)}}
  DATE : {{\Carbon\Carbon::parse($payment_voucher->date)->toFormattedDateString()}}
  Exchange Rate : {{$payment_voucher->exchange_rate}}
{{--*/ $total_amount_TSH = 0 /*--}} {{--*/ $total_amount_USD = 0 /*--}} @foreach($payment_voucher->paymentVoucherAccounts as $payment_voucher_account) @if($payment_voucher_account->currency == 'TSH') {{--*/ $total_amount_TSH +=$payment_voucher_account->amount/*--}} @elseif($payment_voucher_account->currency == 'USD') {{--*/ $total_amount_USD+=$payment_voucher_account->amount/*--}} @endif @endforeach @if($total_amount_TSH < 1) @else @if($total_amount_USD <1) @endif @endif @if($payment_voucher->exchange_rate > 0) @if($payment_voucher->currency == 'USD') {{--*/ $tsh_to_usd = \App\Logistics\Facades\Logistics::currencyConvert($total_amount_TSH, 'TSH',$payment_voucher->exchange_rate, 'USD') /*--}} @else {{--*/ $usd_to_tsh = \App\Logistics\Facades\Logistics::currencyConvert($total_amount_USD, 'USD',$payment_voucher->exchange_rate, 'TSH') /*--}} @endif @endif
DESCRIPTION OF ITEM/SERVICE CURRENCY: AMOUNT
{{$payment_voucher_account->dr}} {{$payment_voucher_account->currency}}{{number_format($payment_voucher_account->amount,2)}}
@if($payment_voucher->loadingOrderItemPaymentVoucher) {{--*/ $loading_order_item = $payment_voucher->loadingOrderItemPaymentVoucher->loadingOrderItem /*--}} Allocation : {{(isset($loading_order_item->clientLoadingOrder)) ? $loading_order_item->clientLoadingOrder->client->name : "NO ALLOCATION ( PIPELINE )"}}
Vehicles : {{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} -{{$loading_order_item->loadingOrderVehicle->trailer->registration_number}}
Driver : {{$loading_order_item->loadingOrderVehicle->driver->driver}} @endif
SUB TOTAL USD {{number_format($total_amount_USD,2)}}
@if($payment_voucher->loadingOrderItemPaymentVoucher) {{--*/ $loading_order_item = $payment_voucher->loadingOrderItemPaymentVoucher->loadingOrderItem /*--}} Allocation : {{(isset($loading_order_item->clientLoadingOrder)) ? $loading_order_item->clientLoadingOrder->client->name : "NO ALLOCATION ( PIPELINE )"}}
Vehicles : {{$loading_order_item->loadingOrderVehicle->vehicle->registration_number}} -{{$loading_order_item->loadingOrderVehicle->trailer->registration_number}}
Driver : {{$loading_order_item->loadingOrderVehicle->driver->driver}} @endif
SUB TOTAL TSH {{number_format($total_amount_TSH,2)}}
SUB TOTAL USD {{number_format($total_amount_USD,2)}}
TOTAL {{$payment_voucher->currency}} {{number_format($total_amount_USD+$tsh_to_usd,2)}}
PAID AMOUNT IN {{$payment_voucher->currency}} {{number_format($total_amount_TSH+$usd_to_tsh,2)}}
@if($payment_voucher->remarks)
Narrations: {{$payment_voucher->remarks }}
@endif
{{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}} {{----}}
PAID BY: {{$payment_voucher->paid_by}} RECEIVED BY : @if($payment_voucher->loadingOrderItemPaymentVoucher){{$loading_order_item->loadingOrderVehicle->driver->full_name}} @else                                  @endif APPROVED BY: AUTHORISED BY: