@extends('layouts.adminapp') @section('title') {{ __('lng.PendingStudentFeeReport') }} - {{ __('lng.Print') }} @endsection @section('active_report', 'active') @section('open_report', 'open') @section('open_student_report', 'open') @section('active_student_report', 'active') @section('active_student_pending_fee_report', 'active') @section('content')

{{ __('lng.Print') }}

@include('PrintHeader.header')

{{$Class->title}} - {{__('lng.PendingStudentFee')}}

@php $si=0; @endphp @foreach ($Students as $Student) @php $dob = date("m-d-Y",strtotime($Student->dob)); $SetAmount=App\Models\SetFee::where('class_id',$Student->class_id) ->where('batch_year',$Student->batch_year) ->where(function($query) { $query->where('isCancelled',0) ->orWhere('isCancelled',NULL); })->sum('total_amount'); $PayedAmount=App\Models\PayFee::where('student_id',$Student->id) ->where('batch_year',$Student->batch_year) ->where(function($query) { $query->where('isCancelled',0) ->orWhere('isCancelled',NULL); })->sum('amount'); $Balance= $SetAmount - $PayedAmount; if($Student->DRorCR){ if($Student->DRorCR == 'Dr'){ $Balance +=$Student->openingbalance; } else{ $Balance -=$Student->openingbalance; } } @endphp @if($Balance>0) @endif @endforeach
{{__('lng.SiNo')}} {{__('lng.Name')}} {{__('lng.Contact')}} {{__('lng.HouseName')}} {{__('lng.Gender')}} {{__('lng.Place')}} {{__('lng.BalanceAmount')}}
{{++$si}} {{$Student->name}} {{$Student->mobile}} {{$Student->housename}} {{$Student->gender}} {{$Student->place}} @currency($Balance)
{{ __('lng.Back') }}
@endsection