Bug: Special Discount charge increases inspector payout instead of reducing it Summary
Summary
When an inspection has a Special Discount service charge with a negative amount (e.g. -$15), payroll sometimes adds commission on that amount to the inspector’s payout instead of subtracting it. The inspector is overpaid by an amount equal to (discount amount × commission rate).
Expected behavior
Special Discount is a service used to apply a custom negative amount to reduce the client’s price.
The work order correctly shows the Special Discount as a negative fee (e.g. -$15).
Payroll should:
Treat Services with a negative charge the same as services with a positive charge - flat fee listed in that service is what is paid out (even if the flat fee is $0) unless a custom pay rate is assigned to that service on the inspector profile.
Actual behavior
The inspector’s total payout is higher than it should be.
The overpayment equals (special discount amount) × (inspector commission rate) (e.g. $15 × 30% = $4.50).
So the Special Discount is effectively being treated as positive revenue for payout (or a separate positive amount is being paid), instead of reducing payout.
Example (OHI payroll)
Inspection: 1371 Cavendar Creek Road - 1/28/26
Main service (e.g. Home/Condo): Inspection fee $524.00, admin fee $75.00, inspector commission 30%.
Expected payout for that service: ($524.00 − $75.00) × 30% = $134.70.
Special Discount: -$15.00 (shown on work order as negative; flat rate for Special Discount service is $0.00).
Actual total shown in Attik payroll for the HOME/CONDO SERVICE: $139.20 (additional amount was not shown for the Special Discount Service).
Discrepancy: +$4.50, which equals $15.00 × 30%.
So the Special Discount is adding $4.50 to payout instead of reducing it (or being excluded).
Notes
Work order shows the Special Discount fee as -$15 (negative).
Special Discount service has flat rate $0.00 (no fixed flat rate).
Payroll logic in attik-backend (dataFunc.ts) does not clamp inspection charge pay to zero; with a negative charge.amount it should compute negative inspector pay for that charge.
Possible causes to investigate:
Special Discount charge stored with positive amount (e.g. +15) despite work order showing -$15.
Another charge on the inspection with a positive amount contributing the extra $4.50.
A bug or edge case in how negative charge amounts are loaded or used in the payroll pipeline.
Log in to comment and vote
No comments yet
Be the first to share your thoughts.