Skip to main content

Function: pricedByRun()

pricedByRun(entry, batch): boolean

Defined in: src/server/services/strandedHours.ts:80

True when this run's pricing actually covered the entry: the row existed at the pricing snapshot AND its assignment was in the run's priced scope. Existence alone is not enough — a rate-less assignment, soft-deleted contractor, or pricing-error skip is excluded from priced_assignment_ids and its hours were NEVER paid, however early they were entered. Null priced scope (pre-0089 batch) errs toward "stranded" (the pre-guard behavior). Still a proxy, not proof of payable status at prepare time (an entry that was draft then was priced at ₱0); the real fix is the settling-week-span lock (#162).

Parameters​

entry​

Pick<StrandedEntryRow, "assignment_id" | "created_at">

batch​

ClosedBatchSnapshot

Returns​

boolean