diff --git a/app/Services/Invoice/InvoiceOneFeePerEntry.php b/app/Services/Invoice/InvoiceOneFeePerEntry.php index 6577546..afe8251 100644 --- a/app/Services/Invoice/InvoiceOneFeePerEntry.php +++ b/app/Services/Invoice/InvoiceOneFeePerEntry.php @@ -35,7 +35,10 @@ class InvoiceOneFeePerEntry implements InvoiceDataService /** @noinspection PhpArrayIndexImmediatelyRewrittenInspection */ $invoiceData['grandTotal'] = 0; - $entries = $school->entries()->with('audition')->orderBy('created_at', 'desc')->get()->groupBy('student_id'); + $entries = $school->entries()->where('for_seating', true) + ->with('audition') + ->orderBy('created_at', 'desc')->get() + ->groupBy('student_id'); foreach ($school->students as $student) { foreach ($entries[$student->id] ?? [] as $entry) { $entryFee = $entry->audition->entry_fee / 100;