Fix cashier desk: unpaid bills on every demo branch.
Deploy Ladill Care / deploy (push) Successful in 39s
Deploy Ladill Care / deploy (push) Successful in 39s
Demo seeding used i%3 for both branch and paid status, so Ridge Clinic only got paid invoices. Cashiers now default to outstanding balances and Call next is secondary to the walk-up unpaid list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<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>
|
||||
<p class="mt-1 text-sm text-slate-500">Outstanding balances ready for walk-up payment</p>
|
||||
</div>
|
||||
@if (app(\App\Services\Care\CareFeatures::class)->enabled($organization, \App\Services\Care\CareFeatures::WORKFLOW_ENGINE))
|
||||
<a href="{{ route('care.obligations.index') }}" class="btn-primary">Financial gates</a>
|
||||
@@ -21,27 +21,15 @@
|
||||
<span class="flex items-center text-sm text-slate-500">{{ $branches->first()->name }}</span>
|
||||
@endif
|
||||
<select name="status" class="rounded-lg border-slate-300 text-sm">
|
||||
<option value="">All statuses</option>
|
||||
<option value="outstanding" @selected(($statusFilter ?? '') === 'outstanding')>Outstanding</option>
|
||||
<option value="" @selected(($statusFilter ?? '') === '')>All statuses</option>
|
||||
@foreach ($statuses as $value => $label)
|
||||
<option value="{{ $value }}" @selected(request('status') === $value)>{{ $label }}</option>
|
||||
<option value="{{ $value }}" @selected(($statusFilter ?? '') === $value)>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<button type="submit" class="btn-primary">Filter</button>
|
||||
</form>
|
||||
|
||||
@if (! empty($canManageQueue) && ! empty($queueIntegration['enabled']))
|
||||
<div class="mt-4">
|
||||
@include('care.partials.queue-ops', [
|
||||
'queueIntegration' => $queueIntegration,
|
||||
'queueCallNextRoute' => 'care.bills.call-next',
|
||||
'queueCallNextParams' => [],
|
||||
'queueCallNextDescription' => 'Call the next patient waiting at the billing booth. Unpaid invoices below stay open for walk-up payment.',
|
||||
'branchId' => $branchId ?? null,
|
||||
'variant' => 'bar',
|
||||
])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="mt-4 overflow-x-auto 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">
|
||||
@@ -101,10 +89,32 @@
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="7" class="px-4 py-8 text-center text-slate-500">No bills yet.</td></tr>
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-8 text-center text-slate-500">
|
||||
@if (($statusFilter ?? '') === 'outstanding')
|
||||
No outstanding invoices at this branch. Choose “All statuses” to browse paid bills.
|
||||
@else
|
||||
No bills yet.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-4">{{ $bills->links() }}</div>
|
||||
|
||||
@if (! empty($canManageQueue) && ! empty($queueIntegration['enabled']))
|
||||
<div class="mt-6 border-t border-slate-100 pt-4">
|
||||
<p class="mb-2 text-xs font-medium uppercase tracking-wide text-slate-400">Booth queue (optional)</p>
|
||||
@include('care.partials.queue-ops', [
|
||||
'queueIntegration' => $queueIntegration,
|
||||
'queueCallNextRoute' => 'care.bills.call-next',
|
||||
'queueCallNextParams' => [],
|
||||
'queueCallNextDescription' => 'Only when a patient is waiting at billing. Otherwise open an unpaid invoice above.',
|
||||
'branchId' => $branchId ?? null,
|
||||
'variant' => 'muted',
|
||||
])
|
||||
</div>
|
||||
@endif
|
||||
</x-app-layout>
|
||||
|
||||
@@ -33,6 +33,18 @@
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
@elseif ($variant === 'muted')
|
||||
<button type="submit" class="group flex w-full items-center justify-between gap-3 rounded-xl border border-slate-200 bg-white px-4 py-3 text-left transition hover:border-slate-300 hover:bg-slate-50">
|
||||
<span class="min-w-0">
|
||||
<span class="block text-sm font-medium text-slate-700">Call next</span>
|
||||
<span class="mt-0.5 block text-xs text-slate-500">{{ $callNextDescription }}</span>
|
||||
</span>
|
||||
<span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-slate-100 text-slate-500 transition group-hover:bg-slate-200">
|
||||
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3" />
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
@else
|
||||
<button type="submit" class="btn-primary flex w-full items-center justify-center text-sm">Call next</button>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user