@php ini_set('memory_limit', '44M'); @endphp

Prepaid Report

@if(count($bills) > 0) @php $count = 0; @endphp

Other Prepaids

@php $total = 0; @endphp @foreach($bills as $row) @php $account = App\Models\ChartofAccount::where('id', $row->account_id)->first(); $accountName = $account != null ? $account->name : ''; @endphp @endforeach
# Account Name Amount Bill Year Bill Month Description
{{++$loop->index}} {{$accountName}} {{$row->amount}} {{$row->bill_year}} {{$row->bill_month - 1}} {{$row->description}}
@endif @if(count($teacherSalary) > 0) @php $count = 0; @endphp

Teacher Prepaids

@php $total = 0; @endphp @foreach($teacherSalary as $row) @php $teacher = App\Models\Teacher::where('id', $row->teacher_id)->first(); $teacherName = $teacher != null ? $teacher->name : ''; @endphp @endforeach
# Teacher Name Amount Payment Year Payment Month Description
{{++$loop->index}} {{$teacherName}} {{$row->amount}} {{$row->payment_year}} {{$row->payment_month - 1}} {{$row->description}}
@endif @if(count($empSalary) > 0) @php $count = 0; @endphp

Employee Prepaids

@php $total = 0; @endphp @foreach($empSalary as $row) @php $emp = App\Models\Employee::where('id', $row->emp_id)->first(); $empName = $emp != null ? $emp->emp_fname : ''; @endphp @endforeach
# Employee Name Amount Payment Year Payment Month Description
{{++$loop->index}} {{$empName}} {{$row->amount}} {{$row->payment_year}} {{$row->payment_month}} {{$row->description}}
@endif @if(count($invenTransactions) > 0) @php $count = 0; @endphp

Inventory Prepaids

@php $total = 0; @endphp @foreach($invenTransactions as $row) @php $item = App\Models\InventoryItems::where('id', $row->item_id)->first(); $transaction = App\Models\Transactions::where('int_trans_id', $row->id)->first(); // $account = App\Models\ChartofAccount::where('id', $row->account_id)->first(); $transactionAmount = $transaction != null ? $transaction->payment: 0; $itemName = $item != null ? $item->name : ''; @endphp @endforeach
# Name Quantity Amount Date Transaction Type
{{++$loop->index}} {{$itemName}} {{$row->quantity}} {{$transactionAmount}} {{$row->date}} {{$row->transaction_type}}
@endif