Function: groupStrandedEntries()
groupStrandedEntries(
entries,closedBatches,ctx):StrandedGroup[]
Defined in: src/server/services/strandedHours.ts:96
Group candidate entries into per-(contractor, assignment, pay period, paidness) groups, keeping
only entries whose PAY period key is in closedBatches ("start|end" ISO pairs → that batch's
ClosedBatchSnapshot). Pure. Membership is by payPeriodForDate, NOT the calendar
period: outsourced pay settles by ISO-week Sunday (ADR-0044), so a period's tail days belong to
the NEXT period's run — flagging those while that run is still open would double-pay them.
Entries the run priced (pricedByRun) split into their own alreadyPaid group so a mixed
assignment-period never quotes paid hours.
Parameters
entries
readonly StrandedEntryRow[]
closedBatches
ReadonlyMap<string, ClosedBatchSnapshot>