@extends('layouts.app')
@section('title', 'Bulk Invoicing')
@section('content')
    <x-page-head title="Bulk Invoicing" subtitle="Batch processing for all students">
        <x-slot:actions>
            <a href="{{ route('finance.bulk-invoices.create') }}" class="btn btn-primary">Generate Bulk Invoices</a>
        </x-slot:actions>
    </x-page-head>
    <x-panel>
        @if ($recentBulk->isEmpty())
            <x-empty-state title="No bulk invoices" message="Run batch invoicing to bill all students at once." />
        @else
            <div class="table-wrap"><table><thead><tr><th>Invoice #</th><th>Total</th><th>Status</th><th>Issue Date</th></tr></thead><tbody>
                @foreach ($recentBulk as $invoice)
                    <tr><td>{{ $invoice->invoice_number }}</td><td>{{ number_format($invoice->total_amount, 2) }}</td><td><x-badge variant="blue">{{ $invoice->status }}</x-badge></td><td>{{ optional($invoice->issue_date)->format('d M Y') }}</td></tr>
                @endforeach
            </tbody></table></div>
        @endif
    </x-panel>
@endsection
