@if($user->due->count()) @php $grandTotal=$waiverTotal=$fineTotal=$paidTotal=$balanceTotal=0; @endphp @foreach($user->due as $due) @php $grandTotal +=$due->fee->amount; @endphp @if(count($due->paymentDetail) > 0) @php $alreadyPaid =$balance= 0 @endphp @foreach($due->paymentDetail as $paymentDetail) @php $waiverTotal +=$paymentDetail->waiver; $fineTotal +=0; $paidTotal +=$paymentDetail->amount; if ($due->status == 1 && $due->paymentDetail->last() == $paymentDetail){ $balance = $due->fee->amount-($alreadyPaid+$paymentDetail->amount+$paymentDetail->waiver); $balanceTotal += $balance; }else{ $alreadyPaid += $paymentDetail->amount+$paymentDetail->waiver; } @endphp @if($paymentDetail->payment->payment_type == 2) @php $payment_type = 'SSLCommerz'; @endphp @elseif($paymentDetail->payment->payment_type == 3) @php $payment_type = 'Stripe'; @endphp @elseif($paymentDetail->payment->payment_type == 4) @php $payment_type = 'Paypal'; @endphp @elseif($paymentDetail->payment->payment_type == 5) @php $payment_type = 'Rocket'; @endphp @else @php $payment_type = 'Cash'; @endphp @endif @endforeach @endif @endforeach @else @endif @if($user->due->count()) @endif
@lang('Fees head') @lang('Dues Date') @lang('Status') @lang('Amount') ({{school('country')->code == 'BD' ? '৳' : '$'}}) @lang('TrxId') @lang('Method') @lang('Date') @lang('Waiver') ({{school('country')->code == 'BD' ? '৳' : '$'}}) @lang('Fine') ({{school('country')->code == 'BD' ? '৳' : '$'}}) @lang('Paid') ({{school('country')->code == 'BD' ? '৳' : '$'}}) @lang('Balance')
{{$due->fee->account_sector->name}} {{date('d-M-Y',strtotime($due->fee->date))}} @if($due->status == 2) @lang('Paid') @else @lang('Unpaid') @endif {{number_format($due->fee->amount,2)}} 0.00 0.00 0.00 @if(count($due->paymentDetail) == 0) @php $balanceTotal += $due->fee->amount; @endphp {{number_format($due->fee->amount,2)}} @endif
@if(auth()->user()->role == 'admin') payment->reciept_number}}
@lang('Collected By'): {{$paymentDetail->payment->user->name}} '> {{$paymentDetail->payment->reciept_number}}
@else {{$paymentDetail->payment->reciept_number}} @endif
{{$payment_type}} {{date('d-M-Y',strtotime($paymentDetail->payment->trans_date))}} {{number_format($paymentDetail->waiver,2)}} 0.00 {{number_format($paymentDetail->amount,2)}} @if($balance>0) {{number_format($balance,2)}} @endif
@lang('These student has no Financial Statement')
@lang('Grand Total') {{school('country')->code == 'BD' ? '৳' : '$'}}{!! number_format($grandTotal,2) !!} {{school('country')->code == 'BD' ? '৳' : '$'}}{!! number_format($waiverTotal,2) !!} {{school('country')->code == 'BD' ? '৳' : '$'}}{!! number_format($fineTotal,2) !!} {{school('country')->code == 'BD' ? '৳' : '$'}}{!! number_format($paidTotal,2) !!} {{school('country')->code == 'BD' ? '৳' : '$'}}{!! number_format($balanceTotal,2) !!}
@if(auth()->user()->role != 'student') {{-- @lang('Receive')--}} @isset($due->student->student_code) student->student_code,date('d-m-Y')])}}>@lang('Receive Fee') @endisset student_code)}}>@lang('Create Due') @endif