@extends('layouts.report_admin')
@section('content')
@include('admin.common.print')
@include('admin.common.report_header')
| {{ __('cruds.passenger_id') }} |
{{ $passenger->prefix. PAD($passenger->serial)}} |
{{ __('cruds.passport_no') }} |
{{ $passenger->passport_no}} |
{{ __('cruds.passenger_service_name') }} |
{{ $passenger->first_name}} |
| {{ __('cruds.office_name') }} |
{{ isset($passenger->passenger_office)?$passenger->passenger_office->office_name:''}} |
{{ __('cruds.agent_name') }} |
{{ isset($passenger->agent)?$passenger->agent->agent_name:''}} |
{{ __('cruds.visa_type') }} |
{{ isset($passenger->visa_type)?$passenger->visa_type->type_name:''}} |
| {{ __('cruds.contact_no') }} |
{{ $passenger->contact_no}} |
{{ __('cruds.sponsor_name') }} |
{{ isset($passenger->sponsor)?$passenger->sponsor->sponsor_name:''}} |
|
| {{ __('cruds.passenger_transaction') }} |
| {{ __('cruds.head_name') }} |
{{ __('cruds.bdt') }} |
{{ __('cruds.sar') }} |
{{ __('cruds.total_receive') }} |
{{ __('cruds.total_dues') }} |
@php
$amount = slug() . "_amount";
$current_receive = slug() . "_current_receive";
$contact_amount = slug() . "_contact_amount";
$profit_amount = slug() . "_profit_amount";
$total_received = 0 ;
$total_dues = 0 ;
@endphp
@if(isset($passenger->transactions))
@foreach ($chunks[0] as $key => $transaction)
@php
$total_amount = $transaction->$amount;
$where = [] ;
$where[] = ['transaction_type','=','Cr'] ;
$where[] = ['passenger_id','=',$passenger->id] ;
$where[] = ['expenditure_sector_id','=',$transaction->expenditure_sector_id] ;
$received_amount = \App\ReceiveVoucherDetails::where($where)->sum($current_receive);
$received_amount = isset($received_amount)?$received_amount:0;
$dues_amount = $total_amount - $received_amount ;
$total_received += $received_amount;
$total_dues += $dues_amount;
@endphp
| {{ $transaction->expenditureSector->sector_name }} |
{{ $total_amount }} |
{{ $transaction->sar_amount }} |
{{ $received_amount }} |
{{ $dues_amount }} |
@endforeach
@endif
|
| {{ __('cruds.head_name') }} |
{{ __('cruds.bdt') }} |
{{ __('cruds.sar') }} |
{{ __('cruds.total_receive') }} |
{{ __('cruds.total_dues') }} |
@if(isset($passenger->transactions))
@foreach ($chunks[1] as $key => $transaction)
@php
$total_amount = $transaction->$amount;
$where = [] ;
$where[] = ['transaction_type','=','Cr'] ;
$where[] = ['passenger_id','=',$passenger->id] ;
$where[] = ['expenditure_sector_id','=',$transaction->expenditure_sector_id] ;
$received_amount = \App\ReceiveVoucherDetails::where($where)->sum($current_receive);
$received_amount = isset($received_amount)?$received_amount:0;
$dues_amount = $total_amount - $received_amount ;
$total_received += $received_amount;
$total_dues += $dues_amount;
@endphp
| {{ $transaction->expenditureSector->sector_name }} |
{{ $total_amount }} |
{{ $transaction->sar_amount }} |
{{ $received_amount }} |
{{ $dues_amount }} |
@endforeach
@endif
|
| |
| {{ __('cruds.contact_amount') }} | {{ $passenger->$contact_amount }}/= |
{{ __('cruds.profit_amount') }} | {{ $passenger->$profit_amount }}/= |
{{ __('cruds.total_receive') }} | {{ $total_received }}/= |
{{ __('cruds.total_dues') }} | {{ $total_dues }}/= |
|
@endsection