Wage calculation worksheet management¶
This operation covers clsClaimTimelossCalculation/clsSecTimelossCalculation (the primary and secondary wage worksheet headers), clsWageWorksheet/clsSecWageWorksheet (the worksheet UI/calculation surface), clsWageCalculationPeriod/clsSecWageCalculationPeriod and their earnings grids (clsWageCalcPeriodEarnings, clsSecWageCalcPeriodEarnings), and clsInjuryClaimWageAndJob, which rolls secondary worksheets into the claim's multiple-employer wage state and enforces the legal-order-date gate.
| Field | Value |
|---|---|
| Operation ID | OP-CP-10 |
| Trigger | Adjuster/auditor creates, edits, verifies, or finalizes a primary (clsClaimTimelossCalculation) or secondary (clsSecTimelossCalculation) wage worksheet |
| Inputs | Calculation method (Hourly/Dollar), pay-period unit, work-shift hours, paid amount, per-period earnings entries, secondary employer name |
| Outputs | CL_CLAIM_TIMELOSS_CALCULATION / CL_SEC_TIMELOSS_CALCULATION header rows; CL_WAGE_CALCULATION_PERIOD / CL_SEC_WAGE_CALCULATION_PERIOD period rows; CL_WAGE_CALC_PERIOD_EARNINGS / CL_SEC_WAGE_CALC_PER_EARNINGS earnings rows; frozen statutory weekly wage on the claim |
| Primary components | clsClaimTimelossCalculation, clsSecTimelossCalculation, clsWageWorksheet, clsSecWageWorksheet, clsWageCalculationPeriod, clsSecWageCalculationPeriod, clsInjuryClaimWageAndJob |
| Entry point | Business\SAIF.Business.Claim.Payment\Wage and Job\clsClaimTimelossCalculation.vb |
Steps¶
- Choose the calculation method. A primary wage worksheet must use calculation method Hourly or Dollar (BR-CP-047).
- Enter per-period earnings. Each wage calculation period exposes exactly 20 earnings-type rows;
AfterRetrieve/RemoveUnusedEarningsRecordspad missing rows on load and drop any dirty row with a blank earnings-type description before save (BR-CP-049), persisted via SQL-029/SQL-088/SQL-112/SQL-132 (CL_WAGE_CALC_PERIOD_EARNINGS) or the secondary equivalents (SQL-026/SQL-080/SQL-107/SQL-129, CL_SEC_WAGE_CALC_PER_EARNINGS). - Enter hourly or dollar values, never both (BR-CP-050).
clsWageWorksheet.SetAmountzeroes the fields belonging to the representation not chosen; gap-coded ("Excluded") periods are omitted from the "less gap" wage totals shown byTotalsLessGapDisplay. - Save the wage calculation period (SQL-030/SQL-089/SQL-113/SQL-133, CL_WAGE_CALCULATION_PERIOD) or the secondary equivalent (SQL-027/SQL-081/SQL-108/SQL-130, CL_SEC_WAGE_CALCULATION_PERIOD).
- Name the secondary employer. A secondary-employer worksheet must additionally name the employer, and if periods exist, use the same calculation-method restriction as a primary worksheet before it can be marked Final (BR-CP-047).
- Validate work-shift hours and wage ranges (BR-CP-047). A Final worksheet requires a paid amount greater than zero and a weekly pay-period unit; hourly units require work-shift hours between 1 and 99.99; wages must fall between 0 and 999,999.99.
- Save the worksheet header (SQL-018/SQL-051/SQL-100/SQL-123, CL_CLAIM_TIMELOSS_CALCULATION) or secondary header (SQL-025/SQL-079/SQL-106/SQL-128, CL_SEC_TIMELOSS_CALCULATION).
- Finalize the worksheet (BR-CP-046).
BeforeInsert/BeforeUpdateon a Final save with a positive wage amount sets the claim's statutory weekly wage to that amount and stamps the finalizing user and date. - Discard superseded worksheets. Saving a Final primary worksheet deletes every In Progress worksheet for the claim (
RemoveInProgressRecords). - Gate auditor verification.
AuditReviewerValidrequires a Final worksheet to already exist before an auditor can verify the calculation (BR-CP-046). - Roll Final secondary worksheets into the claim's wage state (BR-CP-051).
clsInjuryClaimWageAndJob.ProcessSecondaryWagesonly considers secondary calculations flagged Final (wage_entry_status_type_code = 'F') when computing the claim's multiple-employer wage rollup; in-progress secondary worksheets remain invisible to downstream payment logic. - Block the legal order date while secondary worksheets are in progress (BR-CP-052).
LegalOrderDateSecInProgressValidblocks saving the claim's legal order date while any secondary wage worksheet remains In Progress. - Recompute tenure from hire date.
clsInjuryClaimWageAndJob.BeforeUpdatesupersedes any manually entered tenure years/months/days with a calculation from the worker's hire date whenever that date is present (BR-CP-052), reading/writingCL_INJURY_CLAIM(SQL-066/SQL-103, CL_INJURY_CLAIM).
Process flow¶
flowchart TD
Start([Adjuster/auditor opens<br>wage worksheet]) --> Method{Calculation method<br>Hourly or Dollar?}
Method -->|No| BlockedMethod([Blocked: invalid method])
Method -->|Yes| Entry[Enter earnings grid;<br>hourly XOR dollar per row]
Entry --> SecName{Secondary worksheet?}
SecName -->|Yes| NameCheck{Employer named?}
NameCheck -->|No| BlockedName([Blocked: employer required])
NameCheck -->|Yes| Ranges
SecName -->|No| Ranges
Ranges{Hours/wage within<br>valid ranges?} -->|No| BlockedRange([Blocked: out of range])
Ranges -->|Yes| Status{Save status?}
Status -->|In Progress| SaveIP[Save worksheet]
Status -->|Final| FinalCheck{Paid amount > 0<br>and weekly unit?}
FinalCheck -->|No| BlockedFinal([Blocked: Final requirements not met])
FinalCheck -->|Yes| Freeze[Freeze statutory wage;<br>stamp finalizer]
Freeze --> Discard[Delete In Progress<br>worksheets for claim]
Discard --> Rollup{Secondary worksheet?}
Rollup -->|Yes| ProcessSec[Roll into multiple-employer<br>wage state]
Rollup -->|No| Done([Worksheet finalized])
ProcessSec --> Done
SaveIP --> Done2([Worksheet saved in progress])
Failure and edge-case behavior¶
- A malformed (non-7-character) days-off string used elsewhere in wage-adjustment logic falls back to counting every calendar day as payable rather than failing outright (BR-CP-054) — this is a defensive fallback, not a validation error, so a genuinely corrupt days-off value is silently treated as "worker works every day."
- Because finalizing a primary worksheet deletes every In Progress worksheet for the claim, any unsaved or draft secondary work in progress can be lost as a side effect of finalizing the primary calculation — there is no confirmation step visible in this layer.
- The legal-order-date gate (BR-CP-052) can block claim closure activity indefinitely if a secondary worksheet is started but never finalized or removed.
- Auditor verification strictly requires a pre-existing Final worksheet; there is no path to verify an In Progress worksheet directly.
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\Wage and Job\clsClaimTimelossCalculation.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsSecTimelossCalculation.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsWageWorksheet.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsSecWageWorksheet.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsWageCalculationPeriod.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsSecWageCalculationPeriod.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsWageCalcPeriodEarnings.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsSecWageCalcPeriodEarnings.vbBusiness\SAIF.Business.Claim.Payment\Wage and Job\clsInjuryClaimWageAndJob.vb