@extends('layouts.app', ['pageTitle' => 'My Expense Claims', 'pageSubtitle' => 'Submit expenses for admin approval and reimbursement'])
@section('content')
<div class="card"><h3 class="section-title">Submit Expense Claim</h3><form method="POST" action="{{ route('user.claims.store') }}" class="form-grid">@csrf
<div class="field"><label>Expense Account</label><select name="chart_of_account_id"><option value="">General Expense</option>@foreach($expenseAccounts as $a)<option value="{{ $a->id }}">{{ $a->code }} - {{ $a->name }}</option>@endforeach</select></div><div class="field"><label>Expense Date</label><input type="date" name="expense_date" value="{{ date('Y-m-d') }}" required></div><div class="field"><label>Title</label><input name="title" required></div><div class="field"><label>Amount</label><input type="number" step="0.01" name="amount" required></div><div class="field"><label>Tax Amount</label><input type="number" step="0.01" name="tax_amount" value="0"></div><div class="field"><label>Receipt Reference</label><input name="receipt_reference"></div><div class="field" style="grid-column:1/-1"><label>Description</label><textarea name="description"></textarea></div><div><button class="btn" type="submit">Submit Claim</button></div></form></div>
<div class="card"><h3 class="section-title">My Claims</h3><div class="table-wrap"><table><thead><tr><th>No</th><th>Date</th><th>Title</th><th>Account</th><th>Amount</th><th>Status</th><th>Admin Note</th></tr></thead><tbody>@foreach($claims as $c)<tr><td>{{ $c->claim_number }}</td><td>{{ $c->expense_date }}</td><td>{{ $c->title }}</td><td>{{ $c->account_name }}</td><td>₦{{ number_format($c->amount+$c->tax_amount,2) }}</td><td><span class="badge warn">{{ $c->status }}</span></td><td>{{ $c->admin_note }}</td></tr>@endforeach</tbody></table></div></div>
@endsection
