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:
@@ -55,10 +55,17 @@ class BillController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$filters = $request->only(['status', 'patient_id']);
|
||||
// Cashiers land on collectible balances; walk-up unpaid list is the primary path
|
||||
// (booth Call next is secondary when financial gates are off).
|
||||
if (! $request->has('status') && $member?->role === 'cashier') {
|
||||
$filters['status'] = 'outstanding';
|
||||
}
|
||||
|
||||
$bills = $this->bills->list(
|
||||
$this->ownerRef($request),
|
||||
$organization->id,
|
||||
$request->only(['status', 'patient_id']),
|
||||
$filters,
|
||||
$branchId > 0 ? $branchId : null,
|
||||
);
|
||||
|
||||
@@ -66,6 +73,7 @@ class BillController extends Controller
|
||||
'organization' => $organization,
|
||||
'bills' => $bills,
|
||||
'statuses' => config('care.bill_statuses'),
|
||||
'statusFilter' => $filters['status'] ?? '',
|
||||
'branches' => $branches,
|
||||
'branchId' => $branchId,
|
||||
'canSwitchBranch' => $this->branchContext->canSwitch($member),
|
||||
@@ -91,7 +99,7 @@ class BillController extends Controller
|
||||
if (! $ticket) {
|
||||
return back()->with(
|
||||
'info',
|
||||
'No patients waiting at the billing booth. Open an unpaid invoice below to record a walk-up payment.',
|
||||
'No patients waiting at the billing booth. Open an unpaid invoice above to record a walk-up payment.',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user