@extends('layouts.master') @section('content')
@csrf
@component('components.search_student', [ 'student_name' => $student_name ?? '', 'student_id_no' => $student_id_no ?? '', 'required' => 'required', ]) @endcomponent
{{ generateDropdown($years, 'name="year_id" id="year_id" class="form-control" required', $year_id ) }}
@if (isset($selectedFeeTypes) && empty($selectedFeeTypes)) @endif
Collect Fees
Collected Fees
@if (isset($selectedFeeTypes) && !empty($selectedFeeTypes))
@csrf
@isset($student_details)
Name : {{ ($student_details->first_name ?? '') . ' ' . ($student_details->last_name ?? '') }} Class (Section) : {{ $student_details->studentClass->class_name ?? '' }} @if ($student_details?->section?->section_name) ({{ $student_details?->section?->section_name }}) @endif
Student ID : {{ $student_id_no }} Roll Number : {{ $student_details->class_roll ?? '' }}
Mobile Number : {{ $student_details?->mobile_no ?? '' }} Department : {{ $student_details?->departmentInfo?->name ?? '' }}
@endisset
@php $total_amount = 0; // $total_discount = 0; @endphp @if (!empty($selectedFeeTypes)) @foreach ($feeTypes as $feeType) @php $amount = calculateFeeAmount($feeType, $selectedFeeTypes, $transport_fee, $hostel_fee); $single_discount = calculateStudentDiscount($amount, $discount); $total_amount += $amount; @endphp @if (($feeType->code == "TRANSPORT" || $feeType->code == "HOSTEL" || $feeType->code == "TUITION") && !empty($selectedMonth) && in_array($feeType->month, $selectedMonth)) @if ($amount > 0) @endif @elseif (array_key_exists($feeType->id, $selectedFeeTypes) && !empty($feeType->month) && in_array($feeType->month, $selectedMonth)) @elseif (array_key_exists($feeType->id, $selectedFeeTypes) && empty($feeType->month)) @endif @endforeach @endif {{-- @php if (!empty($discount)) { if ($discount->discount_type == 'percentage' && $discount->amount > 0) { $total_discount = ($total_amount * $discount->amount) / 100; } elseif ($discount->discount_type == 'fixedamount' && $discount->amount > 0) { $total_discount = $discount->amount; } } @endphp --}}
Select {{--
--}}
Fee Type Amount
@if (!empty($invoice_fee_type_id) && in_array($feeType->id, $invoice_fee_type_id))
@else
@endif
{{ $feeType->title . ' (' . $years[$year_id] }})
@if (!empty($invoice_fee_type_id) && in_array($feeType->id, $invoice_fee_type_id))
@else
@endif
{{ $feeType->title . ' (' . $years[$year_id] }})
@if (!empty($invoice_fee_type_id) && in_array($feeType->id, $invoice_fee_type_id))
@else
@endif
{{ $feeType->title.' ('.$years[$year_id] }})
Total Fees
Total Discount
@php $last_pay_day = '10'; $today = date('d'); $fine_amount = 0; if ($last_pay_day < $today && !empty($selectedFeeTypes)) { $fine_amount = 10; } @endphp
Grand Total
Note (Optional)
@if (isset($selectedFeeTypes) && !empty($selectedFeeTypes))
@endif
@else

Search above with Student ID/Gurdian Mobile, year and month to collect fees.

@endif
@endsection @section('scripts') @endsection