Fix cashier desk: unpaid bills on every demo branch.
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:
isaacclad
2026-07-18 23:22:54 +00:00
co-authored by Cursor
parent b84c7e31ba
commit a34d6579cd
7 changed files with 143 additions and 29 deletions
+22
View File
@@ -377,6 +377,28 @@ class DemoSeedCommandTest extends TestCase
$this->assertNotNull($waiter->practitioner_id, 'Demo waiters must all have a doctor assigned');
$this->assertNotSame('unresolved', $waiter->queue_routing_status);
}
$branches = Branch::query()->where('organization_id', $org->id)->orderBy('id')->get();
$this->assertGreaterThanOrEqual(3, $branches->count());
foreach ($branches as $branch) {
$unpaid = Bill::query()
->where('organization_id', $org->id)
->where('branch_id', $branch->id)
->where('balance_minor', '>', 0)
->count();
$this->assertGreaterThan(
0,
$unpaid,
"Branch {$branch->name} must have unpaid demo invoices for cashiers",
);
}
$cashier = \App\Models\Member::query()
->where('organization_id', $org->id)
->where('role', 'cashier')
->first();
$this->assertNotNull($cashier);
$this->assertSame((int) $branches->first()->id, (int) $cashier->branch_id);
}
public function test_specialty_doctor_links_after_sso_public_id_remap(): void