Make cashier billing invoices actionable for walk-up payment.
Deploy Ladill Care / deploy (push) Successful in 1m1s
Deploy Ladill Care / deploy (push) Successful in 1m1s
Clarify booth Call next vs unpaid invoice list, and expose Pay/View row actions so cashiers can open bills when the booth queue is empty. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -158,4 +158,39 @@ class CareBillTest extends TestCase
|
||||
->assertOk()
|
||||
->assertSee('INV-');
|
||||
}
|
||||
|
||||
public function test_cashier_bills_index_links_each_invoice_for_payment(): void
|
||||
{
|
||||
$this->actingAs($this->user)
|
||||
->post(route('care.bills.generate', $this->visit));
|
||||
|
||||
$bill = Bill::firstOrFail();
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->get(route('care.bills.index'))
|
||||
->assertOk()
|
||||
->assertSee($bill->invoice_number)
|
||||
->assertSee(route('care.bills.show', $bill), false)
|
||||
->assertSee('Pay')
|
||||
->assertSee('Actions');
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->get(route('care.bills.show', $bill))
|
||||
->assertOk()
|
||||
->assertSee('Record payment');
|
||||
}
|
||||
|
||||
public function test_call_next_empty_booth_explains_walk_up_invoices(): void
|
||||
{
|
||||
\Illuminate\Support\Facades\Http::fake();
|
||||
|
||||
$settings = $this->organization->settings ?? [];
|
||||
$settings['queue_integration_enabled'] = true;
|
||||
$this->organization->update(['settings' => $settings]);
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->post(route('care.bills.call-next'), ['branch_id' => Branch::firstOrFail()->id])
|
||||
->assertRedirect()
|
||||
->assertSessionHas('info', 'No patients waiting at the billing booth. Open an unpaid invoice below to record a walk-up payment.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user