@extends('backEnd.master') @section('title') @lang('reports.fees_statement') @endsection @section('mainContent') @php $setting = generalSetting(); if(!empty($setting->currency_symbol)){ $currency = $setting->currency_symbol; }else{ $currency = '$'; } @endphp

@lang('common.select_criteria')

{{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => 'fees_statement_search', 'method' => 'POST', 'enctype' => 'multipart/form-data', 'id' => 'search_student']) }}
@if ($errors->has('class')) {{ $errors->first('class') }} @endif
loader
@if ($errors->has('section')) {{ $errors->first('section') }} @endif
loader
@if ($errors->has('student')) {{ $errors->first('student') }} @endif
{{ Form::close() }}
@if(isset($fees_assigneds))

@lang('reports.fees_statement')

@lang('common.name')
{{$student->full_name}}
@lang('student.father_name')
{{$student->parents !=""?$student->parents->fathers_name:""}}
@lang('common.mobile')
{{$student->mobile}}
@lang('student.category')
{{$student->category!=""?$student->category->category_name:""}}
@lang('common.class_sec')
@if($student->class !="" && $student->section !="") {{$student->class->class_name .'('.$student->section->section_name.')'}} @endif
@lang('student.admission_no')
{{$student->admission_no}}
@lang('student.roll_no')
{{$student->roll_no}}
@endif
@if(isset($fees_assigneds))
@php $grand_total = 0; $total_fine = 0; $total_discount = 0; $total_paid = 0; $total_grand_paid = 0; $total_balance = 0; @endphp @foreach($fees_assigneds as $fees_assigned) @php $grand_total += $fees_assigned->feesGroupMaster->amount; $discount_amount = $fees_assigned->applied_discount; $total_discount += $discount_amount; $student_id = $fees_assigned->student_id; $paid = App\SmFeesAssign::discountSum($fees_assigned->student_id, $fees_assigned->feesGroupMaster->feesTypes->id, 'amount', $fees_assigned->record_id); $total_grand_paid += $paid; $fine = App\SmFeesAssign::discountSum($fees_assigned->student_id, $fees_assigned->feesGroupMaster->feesTypes->id, 'fine', $fees_assigned->record_id); $total_fine += $fine; $total_paid = $discount_amount + $paid; @endphp @php $payments = App\SmFeesAssign::feesPayment($fees_assigned->feesGroupMaster->feesTypes->id, $fees_assigned->student_id, $fees_assigned->record_id); $i = 0; @endphp @foreach($payments as $payment) @endif @endforeach @endforeach @php $show_balance=$grand_total+$total_fine-$total_discount; @endphp
@lang('fees.fees_group') @lang('reports.due_date') @lang('common.status') @lang('reports.amount') ({{generalSetting()->currency_symbol}}) @lang('reports.payment_id') @lang('reports.mode') @lang('common.date') @lang('reports.discount') ({{generalSetting()->currency_symbol}}) @lang('reports.fine') ({{generalSetting()->currency_symbol}}) @lang('reports.paid') ({{generalSetting()->currency_symbol}}) @lang('reports.balance')
{{@$fees_assigned->feesGroupMaster->feesGroups->name}} / {{@$fees_assigned->feesGroupMaster->feesTypes->name}} @if($fees_assigned->feesGroupMaster !="") {{$fees_assigned->feesGroupMaster->date != ""? dateConvert($fees_assigned->feesGroupMaster->date):''}} @endif @php $rest_amount = $fees_assigned->feesGroupMaster->amount - $total_paid; $total_balance += $rest_amount; $balance_amount = number_format($rest_amount+$fine, 2, '.', ''); @endphp @if($balance_amount == 0) @elseif($paid != 0) @elseif($paid == 0) @endif {{$fees_assigned->feesGroupMaster->amount}} {{$discount_amount}} {{$fine}} {{$paid}} @php $rest_amount = $fees_assigned->fees_amount; $total_balance += $rest_amount; echo $balance_amount; @endphp
@php $created_by = App\User::find($payment->created_by); @endphp @if($created_by != "") {{$payment->fees_type_id.'/'.$payment->id}} {{$payment->payment_mode}} {{$payment->payment_date != ""? dateConvert($payment->payment_date):''}} {{$payment->discount_amount}} {{$payment->fine}} @if($payment->fine!=0) @if (strlen($payment->fine_title) > 14) ({{substr($payment->fine_title, 0, 15) . '...'}}) @else @if ($payment->fine_title=='') {{$payment->fine_title}} @else ({{$payment->fine_title}}) @endif @endif @endif {{$payment->amount}}
@lang('reports.grand_total') ({{generalSetting()->currency_symbol}}) {{ currency_format($grand_total) }} {{ currency_format($total_discount) }} {{currency_format($total_fine) }} {{ currency_format($total_grand_paid) }}{{ currency_format($show_balance-$total_grand_paid) }}
@endif @endsection