Skip to main content

Function: loadContractorPayHistory()

loadContractorPayHistory(companyId, contractorId): Promise<HistoryRow[]>

Defined in: src/server/services/payrollInsights.ts:92

Block 4: one contractor's saved payments (with the stored per-week breakdown and signed adjustments — the receipt renders from these, never recomputes) merged with their payable time entries by PAY period (payPeriodForDate: outsourced settles by ISO-week Sunday, so the contractor type and assignment end dates are loaded to bucket entries correctly). Company-scoped on every read: a foreign contractor id simply returns no rows.

Parameters

companyId

string

contractorId

string

Returns

Promise<HistoryRow[]>