Skip to main content

Function: settlementFor()

settlementFor(dates, ctx, closedBatchKeys): Map<string, DateSettlement>

Defined in: src/lib/pay/settlement.ts:102

Map each ISO date to the run that pays it and whether that run already went out. closedBatchKeys holds periodKeyOf-shaped keys of batches in CLOSED_BATCH_STATUSES; pass an empty set to just enumerate paying periods (e.g. to know which batches to query first). Pure — call it twice around the batch query when needed.

Parameters​

dates​

readonly string[]

ctx​

SettlementContext

closedBatchKeys​

ReadonlySet<string>

Returns​

Map<string, DateSettlement>