@if($invoiceSettings->per_th==1) @elseif($invoiceSettings->per_th==2) @elseif($invoiceSettings->per_th==3) @endif @php $setting = generalSetting(); $in_no=1; @endphp @foreach ($students as $student) @php $invoice_no= $invoiceSettings->prefix !=null ? $invoiceSettings->prefix.$student->admission_no.$student->id.$in_no++ : (string) date('Ymd').$student->admission_no.$student->id.$in_no++; $parent =$student->studentDetail->parents; $fees_assigneds=$student->fees; @endphp
@if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if( $invoiceSettings->per_th==3) @endif @php $grand_total = 0; $total_fine = 0; $total_discount = 0; $total_paid = 0; $total_grand_paid = 0; $total_balance = 0; $totalpayable=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; //Sum of total paid amount of single fees type $paid = \App\SmFeesAssign::feesPayment($fees_assigned->feesGroupMaster->feesTypes->id,$fees_assigned->student_id, $student->id)->sum('amount'); $total_grand_paid += $paid; //Sum of total fine for single fees type $fine = \App\SmFeesAssign::feesPayment($fees_assigned->feesGroupMaster->feesTypes->id,$fees_assigned->student_id, $student->id)->sum('fine'); $total_fine += $fine; $total_paid = $discount_amount + $paid; @endphp @php $assigned_main_fees=number_format((float)@$fees_assigned->feesGroupMaster->amount, 2, '.', ''); $p_amount= $assigned_main_fees-$paid + $fine-$discount_amount; // $totalpayable+=number_format((float)@$fees_assigned->feesGroupMaster->amount, 2, '.', ''); $totalpayable+=$p_amount; @endphp @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) {{-- @if ($p_amount>0) --}} @endif {{-- @endif --}} @if($invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) {{-- @if ($p_amount>0) --}} @endif {{-- @endif --}} {{-- @if ($p_amount>0) --}} @if($invoiceSettings->per_th==3) @endif {{-- @endif --}} @endforeach @php $totalpayable=$totalpayable; if ($totalpayable<0) { $totalpayable=0.00; } else { $totalpayable=$totalpayable; } @endphp @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if( $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if( $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif @if($invoiceSettings->per_th==3) @endif
@if (file_exists($setting->logo)) @endif

{{$setting->school_name}}

{{$setting->address}}

  • @lang('student.admission_no'): {{@$student->studentDetail->admission_no}}

    @lang('common.date'): {{date('d/m/Y')}}

  • @lang('student.student_name'): {{@$student->studentDetail->full_name}}

    @lang('bulkprint::bulk.invoice_no') : {{$invoice_no}}

  • @lang('common.class'): {{@$student->class->class_name}}

    @lang('student.roll'):{{@$student->roll_no}}

  • @lang('common.section'): {{@$student->section->section_name}}

    @lang('common.group'): ___

@if (file_exists($setting->logo)) @endif

{{$setting->school_name}}

{{$setting->address}}

  • @lang('student.admission_no'): {{@$student->studentDetail->admission_no}}

    @lang('common.date'): {{date('d/m/Y')}}

  • @lang('student.student_name'): {{@$student->studentDetail->full_name}}

    @lang('bulkprint::bulk.invoice_no') : {{$invoice_no}}

  • @lang('common.class'): {{@$student->class->class_name}}

    @lang('student.roll'):{{@$student->roll_no}}

  • @lang('common.section'): {{@$student->section->section_name}}

    @lang('common.group'): ___

@if (file_exists($setting->logo)) @endif

{{$setting->school_name}}

{{$setting->address}}

  • @lang('student.admission_no'): {{@$student->studentDetail->admission_no}}

    @lang('common.date'): {{date('d/m/Y')}}

  • @lang('student.student_name'): {{@$student->studentDetail->full_name}}

    @lang('bulkprint::bulk.invoice_no') : {{$invoice_no}}

  • @if(moduleStatusCheck('University')) @lang('university::un.faculty_department'): {{ @$student->unFaculty->name .'('. @$student->unDepartment->name .')' }} @else @lang('common.class'): {{@$student->class->class_name}} @endif

    @lang('student.roll'):{{@$student->roll_no}}

  • @if(moduleStatusCheck('University')) @lang('university::un.semester(label)'): {{ @$student->unSemester->name .'('. @$student->unSemesterLabel->name .')' }} @else @lang('common.section'): {{@$student->section->section_name}} @endif

    @lang('common.group'): ___

@lang('fees.fees_details') @lang('accounts.amount') ({{generalSetting()->currency_symbol}}) @lang('fees.fees_details') @lang('accounts.amount') ({{generalSetting()->currency_symbol}}) @lang('fees.fees_details') @lang('accounts.amount') ({{generalSetting()->currency_symbol}})

{{$fees_assigned->feesGroupMaster!=""?$fees_assigned->feesGroupMaster->feesGroups->name:""}} [{{$fees_assigned->feesGroupMaster!=""?$fees_assigned->feesGroupMaster->feesTypes->name:""}}]

@if ($discount_amount>0)

@lang('fees.discount')(-)

@endif @if ($fine>0)

@lang('fees.fine')(+)

@endif @if ($paid>0)

@lang('fees.paid')(+)

@endif
{{@$assigned_main_fees}} @if ($discount_amount>0)
{{currency_format($discount_amount)}} @endif @if ($fine>0)
{{currency_format($fine)}} @endif @if ($paid>0)
{{currency_format($paid)}} @endif

{{$fees_assigned->feesGroupMaster!=""?$fees_assigned->feesGroupMaster->feesGroups->name:""}} [{{$fees_assigned->feesGroupMaster!=""?$fees_assigned->feesGroupMaster->feesTypes->name:""}}]

@if ($discount_amount>0)

@lang('fees.discount')(-)

@endif @if ($fine>0)

@lang('fees.fine')(+)

@endif @if ($paid>0)

@lang('fees.paid')(+)

@endif
{{@$assigned_main_fees}} @if ($discount_amount>0)
{{currency_format($discount_amount)}} @endif @if ($fine>0)
{{currency_format($fine)}} @endif @if ($paid>0)
{{currency_format($paid)}} @endif

{{$fees_assigned->feesGroupMaster!=""?$fees_assigned->feesGroupMaster->feesGroups->name:""}} [{{$fees_assigned->feesGroupMaster!=""?$fees_assigned->feesGroupMaster->feesTypes->name:""}}]

@if ($discount_amount>0)

@lang('fees.discount')(-)

@endif @if ($fine>0)

@lang('fees.fine')(+)

@endif @if ($paid>0)

@lang('fees.paid')(+)

@endif
{{@$assigned_main_fees}} @if ($discount_amount>0)
{{currency_format($discount_amount)}} @endif @if ($fine>0)
{{currency_format($fine)}} @endif @if ($paid>0)
{{currency_format($paid)}} @endif

@lang('fees.total_payable_amount')

{{-- {{ number_format((float) $unapplied_discount_amount, 2, '.', '')}}
--}} {{ currency_format((float) $totalpayable)}}

@lang('fees.total_payable_amount')

{{-- {{ currency_format((float) $unapplied_discount_amount)}}
--}} {{ currency_format((float) $totalpayable)}}

@lang('fees.total_payable_amount')

{{-- {{ number_format((float) $unapplied_discount_amount, 2, '.', '')}}
--}} {{ number_format((float) $totalpayable, 2, '.', '')}}
@lang('fees.if_unpaid_admission_will_be_cancelled_after') @lang('fees.if_unpaid_admission_will_be_cancelled_after') @lang('fees.if_unpaid_admission_will_be_cancelled_after')

@lang('fees.parents_phone_number') : {{@$parent->guardians_mobile}}

@lang('fees.parents_phone_number') : {{@$parent->guardians_mobile}}

@lang('fees.parents_phone_number') : {{@$parent->guardians_mobile}}

@endforeach