Fix Commission Statements

Current Status

Total Statements
399
Missing Carrier Link
377
With Transactions (totals recalculable)
399

What This Fixes

  • Links statements to InsuranceCarrier records using their carrierMachineAddress (if not already linked)
  • Recalculates premium and commission totals from transactions, properly accounting for positive and negative signs (fixes absolute value calculation bug)

This will scan all active statements, link missing carriers, and recalculate totals from transaction line items.

agencypipeline