Files
ladill-care/resources/views/care/bills/index.blade.php
T
isaaccladandCursor 6c9c742ed8
Deploy Ladill Care / deploy (push) Failing after 13s
Initial Ladill Care release.
Healthcare management app: patients, appointments, consultations, lab,
pharmacy inventory, billing, and reports at care.ladill.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 11:36:22 +00:00

41 lines
2.4 KiB
PHP

@php $money = fn ($minor) => config('care.billing.currency').' '.number_format($minor / 100, 2); @endphp
<x-app-layout title="Bills">
<div class="flex items-center justify-between">
<div>
<h1 class="text-xl font-semibold text-slate-900">Bills & invoices</h1>
<p class="mt-1 text-sm text-slate-500">Encounter billing and outstanding balances</p>
</div>
</div>
<form method="GET" class="mt-4 flex gap-3 rounded-2xl border border-slate-200 bg-white p-4">
<select name="status" class="rounded-lg border-slate-300 text-sm">
<option value="">All statuses</option>
@foreach ($statuses as $value => $label)
<option value="{{ $value }}" @selected(request('status') === $value)>{{ $label }}</option>
@endforeach
</select>
<button type="submit" class="btn-primary">Filter</button>
</form>
<div class="mt-4 overflow-hidden rounded-2xl border border-slate-200 bg-white">
<table class="min-w-full text-sm">
<thead class="bg-slate-50 text-left text-xs uppercase text-slate-500">
<tr><th class="px-4 py-3">Invoice</th><th class="px-4 py-3">Patient</th><th class="px-4 py-3">Total</th><th class="px-4 py-3">Balance</th><th class="px-4 py-3">Status</th><th></th></tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse ($bills as $bill)
<tr>
<td class="px-4 py-3 font-mono text-xs">{{ $bill->invoice_number }}</td>
<td class="px-4 py-3">{{ $bill->patient->fullName() }}</td>
<td class="px-4 py-3">{{ $money($bill->total_minor) }}</td>
<td class="px-4 py-3 {{ $bill->balance_minor > 0 ? 'text-amber-700' : '' }}">{{ $money($bill->balance_minor) }}</td>
<td class="px-4 py-3">{{ $statuses[$bill->status] ?? $bill->status }}</td>
<td class="px-4 py-3 text-right"><a href="{{ route('care.bills.show', $bill) }}" class="text-sky-600">View</a></td>
</tr>
@empty
<tr><td colspan="6" class="px-4 py-8 text-center text-slate-500">No bills yet.</td></tr>
@endforelse
</tbody>
</table>
</div>
<div class="mt-4">{{ $bills->links() }}</div>
</x-app-layout>