Function: confirmReconciliation()
confirmReconciliation(
_prev,formData):Promise<ConfirmReconciliationState>
Defined in: src/server/actions/checks.ts:507
Billing-domain staff: apply a confirmed check amount across the payer's outstanding invoices. (The
confirm BUTTON is owner-only in ReconcileCheck, but this gate is and always was the domain — see
D4 in docs/reconciliation/decisions.md, which drops the UI restriction to match.) The order is
recomputed authoritatively here — remittance lines matched by date + amount (INV tiebreak), pooled
across the payer's facility set; a single-facility payer spreads any remainder oldest-first, a
management-company payer holds it. allocateCheck then runs over that order and the
confirm_check_reconciliation RPC applies it atomically (per-invoice, cross-facility).
Parameters
_prev
formData
FormData
Returns
Promise<ConfirmReconciliationState>