Issue cashier booth tickets when financial gates block service.
Deploy Ladill Care / deploy (push) Successful in 41s

Pay-before-service holds now create a billing queue ticket (via an open bill) so cashiers can Call next / Serve; clearance completes the ticket and releases the clinical line as before.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 19:29:29 +00:00
co-authored by Cursor
parent c3219a1bf1
commit 131ccd6edb
9 changed files with 405 additions and 23 deletions
@@ -18,6 +18,9 @@ use App\Services\Care\CarePricingService;
* A "before" gate blocks entry to the stage's service queue until the stage's
* obligation is cleared (paid / authorized / waived / deferred). An "after"
* gate never blocks entry but is created so the balance is collected at exit.
*
* When Care Queue Engine is enabled, WorkflowEngine / WorkflowQueueReleaseService
* place awaiting_payment visits on the billing (cashier) queue via an open bill.
*/
class FinancialGateService
{
@@ -143,7 +146,17 @@ class FinancialGateService
'cleared_at' => now(),
])->save();
return $obligation;
$organization = Organization::query()->find($obligation->organization_id);
if ($organization) {
// Lazy resolve avoids a constructor cycle with WorkflowQueueReleaseService.
app(WorkflowQueueReleaseService::class)->completeCashier(
$organization,
$obligation->fresh(['bill']) ?? $obligation,
$method,
);
}
return $obligation->fresh() ?? $obligation;
}
public function void(FinancialObligation $obligation): FinancialObligation