Receivables Reports

@if(isset($invoices))

Student Receivables

@php $count = 0; @endphp @foreach($invoices as $row) @php $student = App\Models\Student::where('id', $row->student_id)->first(); $course = App\Models\Course::where('id', $row->section_id)->first(); @endphp @endforeach
# Student Name Course Name Date Total Payment Remaining
{{++$loop->index}} {{$student->name}} {{$course != null ? $course->title: ''}} {{$row->creation_timestamp}} {{$row->payable_amount}} {{$row->payment}} {{$row->payable_amount - $row->payment}}
@endif @if(isset($bookInvoices))

Book Receivables

@php $count = 0; @endphp @foreach($bookInvoices as $row) @php $student = App\Models\Student::where('id', $row->student_id)->first(); $course = App\Models\Course::where('id', $row->section_id)->first(); @endphp @endforeach
# Student Name Date Total Payment Remaining
{{++$loop->index}} {{$student->name}} {{$row->creation_timestamp}} {{$row->payable_amount}} {{$row->payment}} {{$row->payable_amount - $row->payment}}
@endif @if(isset($transactions))

Other Receivables

@php $count = 0; @endphp @foreach($transactions as $row) @php $account = App\Models\ChartofAccount::where('id', $row->account_id)->first(); $totalAmount = 0; $totalPayment = 0; $totalAmount += $row->amount; $totalPayment += $row->payment; @endphp @endforeach
# Name Account Name Amount Payment Remaining
{{++$loop->index}} {{$row->title}} {{$account->name}} {{$row->amount}} {{$row->payment}} {{$row->amount - $row->payment}}
@endif @if(isset($invoices)) ';
Total To Pay {{$remaining}}
@endif