Offset and supplemental wage calculation¶
This operation covers clsOffsetWageCalculation/clsOffsetWageCalcPeriod(s) (per-period offset earnings from a worker's hourly/overtime entries) and clsSupplementalWages/clsSupplementalWagePeriod(s) (the supplemental-TD shortfall calculation), which together determine the OffsetAmount/OffsetAmountAdjusted applied to a timeloss benefit period in Timeloss payment issuance.
| Field | Value |
|---|---|
| Operation ID | OP-CP-11 |
| Trigger | clsTimelossPayment.AssignOffsetWagesToPeriods computing offset/supplemental amounts as part of timeloss payment validation |
| Inputs | Wage type (Daily/BiWeekly/SupTD), hours worked, hourly rate, overtime hours, overtime rate, worker's average weekly wage, secondary employer earnings |
| Outputs | CL_OFFSET_CALC_PERIOD / CL_OFFSET_WAGE_CALCULATION rows; CL_SEC_WAGE_EARNINGS supplemental period rows; OffsetAmount/OffsetAmountAdjusted on affected benefit periods |
| Primary components | clsOffsetWageCalculation, clsOffsetWageCalcPeriod, clsOffsetWageCalcPeriods, clsSupplementalWages, clsSupplementalWagePeriod, clsSupplementalWagePeriods |
| Entry point | Business\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsOffsetWageCalculation.vb |
Steps¶
- Select the wage type and build calculation periods (BR-CP-053).
clsOffsetWageCalculation.BuildCalcPeriodsproduces one offset period per calendar day for Daily wage type, or one period per benefit period for BiWeekly; SupTD periods are excluded from the offset build entirely. - Create the offset wage calculation header (SQL-022/SQL-069/SQL-105/SQL-127, CL_OFFSET_WAGE_CALCULATION), sequenced via SQL-006 (
OFFSET_WAGE_CALC_SEQ_NUM). - Enter hours/rate data per period (SQL-021/SQL-068/SQL-104/SQL-126, CL_OFFSET_CALC_PERIOD), sequenced via SQL-005 (
OFFSET_CALC_PERIOD_SEQ_NUM). - Require a rate whenever Daily-mode hours are entered (BR-CP-056).
CheckValidHourlyRatewarns (does not block) when Daily-mode hours are entered without an hourly rate;CheckValidOvertimeRatedoes the same for overtime hours/rate. - Compute rounded per-period earnings (BR-CP-053).
GetCalculatedEarnings/theEarningssetter compute (hours worked × hourly rate) + (overtime hours × overtime rate), rounded to 2 decimal places using round-half-away-from-zero, and sum intoTotalOffsetWages. - Compute the worker-adjusted average weekly wage (BR-CP-054).
GetWorkerAdjustedAverageWeeklyWages/GetWorkerDaysPayablecompute (average weekly wage ÷ scheduled work days per week) × days payable in the period; a half-shift period deducts 0.5 day, and a malformed (non-7-character) days-off string falls back to counting every calendar day as payable. - Load secondary-employer earnings for the supplemental calculation (SQL-028/SQL-082/SQL-111/SQL-131, CL_SEC_WAGE_EARNINGS) via
clsSupplementalWages.GetSecondaryEmployers, which only considers secondary wage worksheets flagged Final (BR-CP-051, SQL-083, CL_SEC_TIMELOSS_CALCULATION). - Compute the supplemental wage shortfall (BR-CP-055).
clsSupplementalWagePeriod.SupplementalEarningscomputes the adjusted average weekly wage minus actual secondary earnings for a SupTD period. - Reallocate the shortfall or over-earning (BR-CP-055).
clsTimelossPayment.AssignOffsetWagesToPeriodsshifts a positive shortfall's excess primary-job earnings onto the supplemental period; a negative value (over-earning on secondary jobs) instead reduces the offset on matching non-supplemental periods. - Apply the computed amounts to the benefit period.
OffsetAmount/OffsetAmountAdjustedare set on the affected benefit periods, directly changing the payable benefit used by Timeloss payment issuance. - Retire prior offset/supplemental data. Individual period rows are deleted via SQL-126/SQL-127/SQL-131 as recalculation supersedes them.
Process flow¶
flowchart TD
Start([Timeloss payment triggers<br>offset/supplemental calculation]) --> WageType{Wage type?}
WageType -->|Daily| BuildDaily[One offset period<br>per calendar day]
WageType -->|BiWeekly| BuildBW[One offset period<br>per benefit period]
WageType -->|SupTD| ExcludeOffset[Excluded from offset build]
BuildDaily --> RateCheck{Hours entered<br>without rate?}
BuildBW --> RateCheck
RateCheck -->|Yes| WarnRate([Warning; save proceeds])
RateCheck -->|No| ComputeEarnings[Compute rounded<br>per-period earnings]
WarnRate --> ComputeEarnings
ComputeEarnings --> AdjustedAWW[Compute worker-adjusted<br>average weekly wage]
AdjustedAWW --> SecEarnings[Load Final secondary-employer<br>earnings]
ExcludeOffset --> SecEarnings
SecEarnings --> Shortfall[Compute supplemental<br>wage shortfall]
Shortfall --> Sign{Shortfall positive<br>or negative?}
Sign -->|Positive| ShiftPrimary[Shift excess primary earnings<br>onto SupTD period]
Sign -->|Negative| ReduceOffset[Reduce offset on<br>non-supplemental periods]
ShiftPrimary --> Apply[Set OffsetAmount /<br>OffsetAmountAdjusted]
ReduceOffset --> Apply
Apply --> Done([Offset applied to<br>benefit period])
Failure and edge-case behavior¶
- A malformed (non-7-character) days-off string is silently treated as "every day payable" rather than raising an error, which could understate the offset for a worker with an unusual or corrupted work schedule (BR-CP-054).
- Because only Final secondary worksheets feed the supplemental calculation (BR-CP-051), a worker's genuinely-earned but not-yet-finalized secondary wages are invisible to the offset/supplemental calculation until that worksheet is finalized — a timing gap between real-world earnings and system-recognized earnings.
- The Daily-mode rate-entry checks are warnings only (BR-CP-056); an offset period can be saved with hours but no rate, producing zero calculated earnings for that period without a hard error.
- Rounding uses round-half-away-from-zero rather than banker's rounding, which is worth flagging for anyone reconciling totals against a different rounding convention.
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Business\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsOffsetWageCalculation.vbBusiness\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsOffsetWageCalcPeriod.vbBusiness\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsOffsetWageCalcPeriods.vbBusiness\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsSupplementalWages.vbBusiness\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsSupplementalWagePeriod.vbBusiness\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsSupplementalWagePeriods.vbBusiness\SAIF.Business.Claim.Payment\Payments\TimelossPayments\clsTimelossPayment.vb