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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user