@extends('backEnd.master') @section('title') @lang('fees.pay_fees') @endsection @section('mainContent')
@foreach($records as $key=> $record)
@if(moduleStatusCheck('University')) @includeIf('university::include.studentPanelFeesPay') @elseif(directFees()) @includeIf('backEnd.feesCollection.directFees.studentDirectFeesPay') @else @php @$grand_total = 0; @$total_fine = 0; @$total_discount = 0; @$total_paid = 0; @$total_grand_paid = 0; @$total_balance = 0; $count = 0 @endphp @foreach($record->fees as $fees_assigned) @php $count++; @$grand_total += @$fees_assigned->feesGroupMaster->amount @endphp @php @$discount_amount = $fees_assigned->applied_discount; @$total_discount += @$discount_amount; @$student_id = @$fees_assigned->student_id @endphp @php //Sum of total paid amount of single fees type $paid = App\SmFeesAssign::feesPayment($fees_assigned->feesGroupMaster->feesTypes->id,$fees_assigned->student_id,$fees_assigned->record_id)->sum('amount'); @$total_grand_paid += @$paid @endphp @php //Sum of total fine for single fees type $fine = App\SmFeesAssign::feesPayment($fees_assigned->feesGroupMaster->feesTypes->id,$fees_assigned->student_id,$fees_assigned->record_id)->sum('fine'); @$total_fine += $fine @endphp @php @$total_paid = @$discount_amount + @$paid @endphp
@lang('fees.fees_group') @lang('fees.fees_code') @lang('fees.due_date') @lang('common.status') @lang('fees.amount') ({{@generalSetting()->currency_symbol}}) @lang('fees.payment_id') @lang('fees.mode') @lang('common.date') @lang('fees.discount') ({{@generalSetting()->currency_symbol}}) @lang('fees.fine') ({{@generalSetting()->currency_symbol}}) @lang('fees.paid') ({{@generalSetting()->currency_symbol}}) @lang('fees.balance') @lang('fees.payment')
{{@$fees_assigned->feesGroupMaster->feesGroups != ""? @$fees_assigned->feesGroupMaster->feesGroups->name:""}} {{@$fees_assigned->feesGroupMaster->feesTypes->name}} {{@$fees_assigned->feesGroupMaster->date != ""? dateConvert(@$fees_assigned->feesGroupMaster->date):''}} @php // $total_payable_amount=$fees_assigned->feesGroupMaster->amount+$fine; $total_payable_amount=$fees_assigned->feesGroupMaster->amount; $rest_amount = $fees_assigned->feesGroupMaster->amount - $total_paid; $balance_amount=number_format($rest_amount+$fine, 2, '.', ''); $total_balance += $balance_amount @endphp @if($balance_amount ==0) @elseif($paid != 0) @elseif($paid == 0) @endif {{currency_format(@$total_payable_amount)}} {{currency_format(@$discount_amount)}} {{currency_format(@$fine)}} {{currency_format(@$paid)}} @php @$rest_amount = $fees_assigned->fees_amount; echo currency_format(@$balance_amount) @endphp @if($rest_amount =! 0) @php $already_add = $student->bankSlips->where('fees_type_id', $fees_assigned->feesGroupMaster->fees_type_id)->first(); @endphp