@extends('layouts.adminapp') @section('content')
@include('PrintHeader.header')

{{$BankingRegister->member->name ?? ''}} - {{__('lng.MemberPaymentReport')}}

@php $TotalTrance=$TotalWith=$Balance=$check=0; $TotalTrance=$BankingRegister->BankingTransaction()->where('isCancelled',false)->orWhereNull('isCancelled')->sum('amount'); $TotalWith=$BankingRegister->BankingWithdraw()->where('isCancelled',false)->orWhereNull('isCancelled')->sum('amount'); $Balance = $TotalTrance - $TotalWith; $check = $BankingRegister->BankingWithdraw()->where('isCancelled',false)->orWhereNull('isCancelled')->count(); @endphp {{__('lng.PayedAmount')}} : @currency($TotalTrance)
{{__('lng.WithdrawAmount')}} : @currency($TotalWith)
@if ($Balance >= 0) {{__('lng.Balance')}} @else {{__('lng.Pending')}} @endif : @currency(abs($Balance))
{{__('lng.PayHistory')}}
@php $si=$Total=0; @endphp @foreach($BankingRegister->BankingTransaction()->where('isCancelled',false)->orWhereNull('isCancelled')->get() as $BankingTransaction) @php $Date = date("d-m-y",strtotime($BankingTransaction->date));@endphp @php $Total+=$BankingTransaction->amount; @endphp @endforeach @if ($Total) @endif
{{__('lng.SiNo')}} {{ __('lng.Date') }} {{ __('lng.PayAmount') }}
{{++$si}} {{ $Date }} @currency($BankingTransaction->amount)
{{__('lng.Total')}} @currency($Total)
@if ($check)
{{__('lng.WithdrawHistory')}}
@php $si=$WithdrawTotal=0; @endphp @foreach($BankingRegister->BankingWithdraw()->where('isCancelled',false)->orWhereNull('isCancelled')->get() as $BankingWithdraw) @php $Date = date("d-m-y",strtotime($BankingWithdraw->date));@endphp @php $WithdrawTotal+=$BankingWithdraw->amount; @endphp @endforeach @if ($WithdrawTotal) @endif
{{__('lng.SiNo')}} {{ __('lng.Date') }} {{ __('lng.PayAmount') }}
{{++$si}} {{ $Date }} @currency($BankingWithdraw->amount)
{{__('lng.Total')}} @currency($WithdrawTotal)
@endif
@endsection