Statistical Salary Component issue

Hello,

I recently ran into following issue:

  • I have a Bonus Salary Component
  • In the Salary Structure this is marked as a Statistical Component and Do not include in total
  • This is then used in the Gross component formula to calculate the gross salary
  • I have a Payroll Entry and generated draft Salary Slips
  • Manually I add the Bonus salary component whenever needed and mark it as Do not include in total
  • The Salary Slip looks fine, everything (all taxes, net payable, gross salary) are calculated properly

Now, when I try to submit the Salary Slips from the Payroll Entry, I get the following error “Please set default account in Salary Component Bonus”. The problem is that when I set the default account, it actually records the Bonus component value on that account (even when the Component is statistical/do not include).

Am I doing something wrong? Is there any workaround?

Thank you,
Karel

Hi, Please share the version, branch you are on.
Thanks

Apologies, Ranjith, forgot about that:

ERPNext: v10.1.42 (master)
Frappe Framework: v10.1.39 (master)

Statistical Component is not added to Salary Slip, please confirm. Not able to replicate
Thanks

He manually added Bonus salary component in Salary slip. That’s why it record to account.

It’s exactly as @magic-overflow mentioned - the Bonus component is added into the Salary Slip manually. The problem is that when I do it that way, the Bonus is not treated as a statistical component and shows up in the Salary Slip (the calculation is ok though).

The Bonus in the Salary Slip form, while added manually, is not marked as a statistical component (so this is not inherited from the Salary Structure) and there seems to be no way how to make it that way.

Do you see any way around this, Ranjith?

I guess it’s not managed in Salary Slip, its only supposed to be added in Salary Structure. Please share your use case, if you think its a feature missing create a github issue.
Thanks

1 Like

I have just done that. For your reference: HR, Payroll: Manually added statistical salary component (Bonus) · Issue #187 · frappe/hrms · GitHub