Salary structure based on Sales and Fines

Hello

Help solve a problem in building a Salary Structure (ST) for a call center.
The salary basis includes hourly payment for agents based on Timesheets (there are no problems with this), but how to automate in ST the payment for each sale made for the sales agent and the fine (their amount may differ, I thought of creating a separate custom doctype, but it is in this form cannot be included in the Salary structure).

Earnings:

  • Hourly Pay based on timesheets
  • Bonuses (for each sale)
  • Additional Payments

Deductions:

  • Fines (Unknown amount, may vary from payment period to another period).

I would be grateful for ideas.