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

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

@php $i=0;@endphp @foreach ($Students as $Student) @if ($Student->VehicleFee->Route?? '') @php $SetFeeAmounts=App\Models\StudentVehicleSetFee::where('student_vehicle_route_id',$Student->VehicleFee->id) ->where('batch_year',$Student->batch_year) ->where(function($query) { $query->where('isCancelled',0) ->orWhere('isCancelled',NULL); })->sum('total_amount'); $PayedAmounts=App\Models\StudentVehiclePayFee::where('student_id',$Student->id) ->where('batch_year',$Student->batch_year) ->where(function($query) { $query->where('isCancelled',0) ->orWhere('isCancelled',NULL); })->sum('amount'); $Balance=$SetFeeAmounts - $PayedAmounts; @endphp @if($Balance>0) @endif @endif @endforeach
{{__('lng.SiNo')}} {{__('lng.Name')}} {{__('lng.Contact')}} {{__('lng.Vehicle')}} {{__('lng.Route')}} {{__('lng.BalanceAmount')}}
{{++$i}} {{$Student->name}} {{$Student->mobile}} {{$Student->VehicleFee->Vehicle->name ?? ''}} {{$Student->VehicleFee->Route->title ?? ''}} @currency($Balance)
{{__('lng.Back')}}
@endsection