@if($invoiceSettings->per_th==1) @elseif($invoiceSettings->per_th==2) @elseif($invoiceSettings->per_th==3) @endif @php $invoice_no= $invoiceSettings->prefix !=null ? $invoiceSettings->prefix.$student->admission_no.$student->id.rand(10,1000) : (string) date('Ymd').$student->admission_no.$student->id.rand(10,1000); $setting = generalSetting(); @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; $discount_amount = 0; $fine = 0; $paid = 0; @endphp @if(moduleStatusCheck('University')) @foreach($fees_assigneds as $feesInstallment) @php if(($feesInstallment->active_status == 0)){ $totalpayable += discountFeesAmount($feesInstallment->id); } $total_grand_paid += $feesInstallment->paid_amount; $grand_total += discountFeesAmount($feesInstallment->id); @endphp {{-- 1st warp start here --}} @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif {{-- 1st warp End --}} {{-- 2nd warp start here --}} @if($invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif {{-- 2nd warp End --}} {{-- 3rd warp start here --}} @if($invoiceSettings->per_th==3) @endif {{-- 3rd warp End --}} @endforeach {{-- University End Here --}} {{-- direct fees start here --}} @elseif(directFees()) @foreach($fees_assigneds as $feesInstallment) @php $activeStatus = $feesInstallment->active_status ?? null; if($activeStatus === 0){ $totalpayable += discountFees($feesInstallment->id); } $grand_total += discountFees($feesInstallment->id); $total_grand_paid += $feesInstallment->paid_amount; @endphp {{-- 1st warp start here --}} @if($invoiceSettings->per_th==1 || $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif {{-- 1st warp End --}} {{-- 2nd warp start here --}} @if($invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif {{-- 2nd warp End --}} {{-- 3rd warp start here --}} @if($invoiceSettings->per_th==3) @endif {{-- 1st warp End --}} @endforeach {{-- direct fees end here --}} @else @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, $fees_assigned->record_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, $fees_assigned->record_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 ($p_amount>0) --}} @if( $invoiceSettings->per_th==2 || $invoiceSettings->per_th==3) @endif {{-- @endif --}} {{-- @if ($p_amount>0) --}} @if($invoiceSettings->per_th==3) @endif {{-- @endif --}} @endforeach @endif @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($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}}

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

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

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

    @lang('common.group'): ___

  • @if(@moduleStatusCheck('University'))

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

    @endif @if(moduleStatusCheck('University') || directFees()) @if(count($fees_assigneds) == 1)

    @lang('fees.payment_id'): {{@universityFeesInvoice($feesInstallment->invoice_no)}}

    @endif @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}}

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

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

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

    @lang('common.group'): ___

  • @if(moduleStatusCheck('University'))

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

    @endif @if(moduleStatusCheck('University') || directFees()) @if(count($fees_assigneds) == 1)

    @lang('fees.payment_id'): {{@universityFeesInvoice($feesInstallment->invoice_no)}}

    @endif @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}}

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

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

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

    @lang('common.group'): ___

  • @if(moduleStatusCheck('University'))

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

    @endif @if(moduleStatusCheck('University') || directFees()) @if(count($fees_assigneds) == 1)

    @lang('fees.payment_id'): {{@universityFeesInvoice($feesInstallment->invoice_no)}}

    @endif @endif
@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}})

{{@$feesInstallment->installment->title }}

@if ($feesInstallment->discount_amount>0)

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

@endif @if ($fine>0)

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

@endif @if ($feesInstallment->paid_amount != 0)

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

@if($feesInstallment->active_status == 1)

[@lang('fees.paid')]

@endif @else

[@lang('fees.unpaid')]

@endif
{{number_format($feesInstallment->amount, 2, '.', '') }} @if ($feesInstallment->discount_amount>0)
{{number_format($feesInstallment->discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($feesInstallment->paid_amount != 0 )
{{number_format($feesInstallment->paid_amount, 2, '.', '')}} @endif

{{@$feesInstallment->installment->title }}

@if ($feesInstallment->discount_amount>0)

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

@endif @if ($fine>0)

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

@endif @if ($feesInstallment->paid_amount != 0)

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

@if($feesInstallment->active_status == 1)

[@lang('fees.paid')]

@endif @else

[@lang('fees.unpaid')]

@endif
{{number_format($feesInstallment->amount, 2, '.', '') }} @if ($feesInstallment->discount_amount>0)
{{number_format($feesInstallment->discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($feesInstallment->paid_amount != 0 )
{{number_format($feesInstallment->paid_amount, 2, '.', '')}} @endif

{{@$feesInstallment->installment->title }}

@if ($feesInstallment->discount_amount>0)

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

@endif @if ($fine>0)

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

@endif @if ($feesInstallment->paid_amount != 0)

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

@if($feesInstallment->active_status == 1)

[@lang('fees.paid')]

@endif @else

[@lang('fees.unpaid')]

@endif
{{number_format($feesInstallment->amount, 2, '.', '') }} @if ($feesInstallment->discount_amount>0)
{{number_format($feesInstallment->discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($feesInstallment->paid_amount != 0 )
{{number_format($feesInstallment->paid_amount, 2, '.', '')}} @endif

{{@$feesInstallment->installment->title }}

@if ($feesInstallment->discount_amount>0)

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

@endif @if ($fine>0)

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

@endif @if ($feesInstallment->active_status == 1)

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

[@lang('fees.paid')]

@else

[@lang('fees.unpaid')]

@endif
{{number_format($feesInstallment->amount, 2, '.', '') }} @if ($feesInstallment->discount_amount>0)
{{number_format($feesInstallment->discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($feesInstallment->active_status ==1 )
{{number_format($feesInstallment->paid_amount, 2, '.', '')}} @endif

{{@$feesInstallment->installment->title }}

@if ($feesInstallment->discount_amount>0)

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

@endif @if ($fine>0)

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

@endif @if ($feesInstallment->active_status == 1)

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

[@lang('fees.paid')]

@else

[@lang('fees.unpaid')]

@endif
{{number_format($feesInstallment->amount, 2, '.', '') }} @if ($feesInstallment->discount_amount>0)
{{number_format($feesInstallment->discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($feesInstallment->active_status ==1 )
{{number_format($feesInstallment->paid_amount, 2, '.', '')}} @endif

{{@$feesInstallment->installment->title }}

@if ($feesInstallment->discount_amount>0)

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

@endif @if ($fine>0)

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

@endif @if ($feesInstallment->active_status == 1)

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

[@lang('fees.paid')]

@else

[@lang('fees.unpaid')]

@endif
{{number_format($feesInstallment->amount, 2, '.', '') }} @if ($feesInstallment->discount_amount>0)
{{number_format($feesInstallment->discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($feesInstallment->active_status ==1 )
{{number_format($feesInstallment->paid_amount, 2, '.', '')}} @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.submit')(+)

@endif

@lang('fees.unpaid')

{{@$assigned_main_fees}} @if ($discount_amount>0)
{{number_format($discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($paid>0)
{{number_format($paid, 2, '.', '')}} @endif
{{number_format(@$p_amount, 2, '.', '')}}

{{$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.submit')(+)

@endif

@lang('fees.unpaid')

{{@$assigned_main_fees}} @if ($discount_amount>0)
{{number_format($discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($paid>0)
{{number_format($paid, 2, '.', '')}} @endif
{{number_format(@$p_amount, 2, '.', '')}}

{{$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.submit')(+)

@endif

@lang('fees.unpaid')

{{@$assigned_main_fees}} @if ($discount_amount>0)
{{number_format($discount_amount, 2, '.', '')}} @endif @if ($fine>0)
{{number_format($fine, 2, '.', '')}} @endif @if ($paid>0)
{{number_format($paid, 2, '.', '')}} @endif
{{number_format(@$p_amount, 2, '.', '')}}

@lang('fees.grand_total')

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

@lang('fees.grand_total')

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

@lang('fees.grand_total')

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

@lang('fees.total_paid')

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

@lang('fees.total_paid')

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

@lang('fees.total_paid')

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

@lang('fees.total_payable_amount')

{{-- {{ number_format((float) $unapplied_discount_amount, 2, '.', '')}}
--}} {{ number_format((float) ($grand_total - $total_grand_paid - $discount_amount), 2, '.', '')}}

@lang('fees.total_payable_amount')

{{-- {{ number_format((float) $unapplied_discount_amount, 2, '.', '')}}
--}} {{ number_format((float) ($grand_total - $total_grand_paid - $discount_amount), 2, '.', '')}}

@lang('fees.total_payable_amount')

{{-- {{ number_format((float) $unapplied_discount_amount, 2, '.', '')}}
--}} {{ number_format((float) ($grand_total - $total_grand_paid - $discount_amount), 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}}