#{{$feeInvoice->name}}

From:

{{auth()->user()->school->name}}

Address: {{auth()->user()->school->address}}

@if (($phone = auth()->user()->school->phone) != null)

Phone: {{$phone}}

@endif @if (($email = auth()->user()->school->email) != null)

Email: {{$email}}

@endif

To

{{$feeInvoice->user->name}}

{{$feeInvoice->name}}

Class: {{$feeInvoice->user->studentRecord->myClass->name}}

Student Admission Number: {{$feeInvoice->user->studentRecord->admission_number}}

Fee Invoice Issue Date: {{$feeInvoice->issue_date->format('F j, Y')}}

Fee Invoice Due Date: {{$feeInvoice->due_date->format('F j, Y')}}

@foreach ($feeInvoice->feeInvoiceRecords as $record) @endforeach
S/N Fee Name Amount Waiver Fine Paid
{{$loop->iteration}} {{$record->fee->name}} {{$record->amount->formatTo(app()->getLocale())}} {{$record->waiver->formatTo(app()->getLocale())}} {{$record->fine->formatTo(app()->getLocale())}} {{$record->paid->formatTo(app()->getLocale())}}

Total Amount: {{$feeInvoice->amount}}

Total Waiver: {{$feeInvoice->waiver}}

Total Fine: {{$feeInvoice->fine}}

Total Paid: {{$feeInvoice->paid}}

Pending Amount: {{$feeInvoice->balance}}

@if ($feeInvoice->balance->isLessThanOrEqualTo(0))
This Invoice Has been Paid
@elseif ($feeInvoice->paid->isGreaterThan(0))
This Invoice Has been Paid Partially
@else
This Invoice Has Not been Paid
@endif