commissionRate in the Base Pay section of their inspector profile should have their pay calculated against that individual rate, not the org-level default.financials.commissionRate on inspectorSchema.ts). This is intended to override the default org-level commission rate for that inspector.inspectorPay on each charge is computed in src/util/functions/payroll/dataFunc.ts (and its legacy predecessor src/util/dataFunc.js). The commission calculation path reads a commissionRate — but the inspector's individual rate is not being correctly picked up, causing the system to fall back to the default flat rate applied to other team members.lineItemsFromContext.ts builds the final per-employee line items from the precomputed PayrollContext, reading charge.inspectorPay directly. If inspectorPay was computed incorrectly upstream in dataFunc.ts, the wrong value flows through unchanged into the payroll output.feeBreakdown.commissionRate field on PayrollFeeBreakdown is intended to capture which rate was actually applied. This can be used to verify whether the correct per-inspector rate is being read and applied, or whether the system is silently falling back.PayrollOverview.tsx is display-only and renders whatever line items the backend produced. The fix must happen in the backend computation layer.financials.commissionRate (set in the Base Pay section of the inspector profile) is the authoritative rate and must take precedence over the service-level commission rate when present.commissionRate is null or unset, the commission rate defined on the service should be used as the fallback.commissionRate → service-level modifier → service base commission rate. The current behavior skips the inspector rate entirely when a service-level modifier is present.src/util/functions/payroll/dataFunc.ts — Primary location where inspectorPay is computed per charge and where commissionRate should be read from the inspector record. Most likely location of the defect.src/util/dataFunc.js — Legacy version of the same logic; may need a parallel fix depending on which code path is active for this instance.src/util/functions/payroll/payrollFeeBreakdown.ts — feeBreakdown.commissionRate should reflect the rate that was actually applied. Useful for verification and debugging.src/models/inspectorSchema.ts — Confirms financials.commissionRate as the per-inspector rate field.src/util/functions/payroll/lineItemsFromContext.ts — Reads charge.inspectorPay to build line items; no change expected here, but the right place to verify the corrected value flows through correctly end-to-end.src/app/tools/hr/payroll/PayrollOverview.tsx and src/app/tools/hr/payroll/CommissionPayrollList.tsx display computed values only.commissionRate set to 40% in Base Paysrc/util/functions/payroll/payrollContext.ts — Builds inspectorById map passed to dataFunc; confirms the inspector record (including financials) is available during computationNeil Chini provided additional specificity during Office Hours on June 23:
Please authenticate to join the conversation.
Planned
Main App
2 days ago
Linear
Get notified by email when there are changes.
Planned
Main App
2 days ago
Linear
Get notified by email when there are changes.