Additional Salary is completely broken

v11.0.3-beta.25 () (staging)

Firstly, the documentation does not explain what many of the functions do and I’m left completely confused by certain options, such as Overwrite Salary Structure Amount:
Screenshot%20from%202018-12-02%2020-41-36

Whether I check it or not seems to make no difference to the function. But here’s the main bug. Let’s say I pay a $10,000 bonus, and create that in Additional Salary. Then I create a new Salary Structure to also include the new bonus system and have it calculate the tax properly, and assign the new structure to the employee:

The below screenshot is the outcome, which is clearly not right. I spent six hours with every possible modification that I could think of to get the bonus to display properly, and have the tax calculate properly (tax should be 5,772.81):

But worse, you cannot modify the Salary Slip without it resetting all the rows (detailed here Manually override employee salary slip · Issue #11977 · frappe/erpnext · GitHub). But yet, every time you load the page it ADDS the bonus to itself every time (I managed to get it to reach $40k while trying to fix it):

And finally, I cannot see the Additional Salaries for all employees, even though I created the bonuses, and can only see my own with a “Restricted” notice in the top right (I have all permissions checked in settings for my user, basically “Full Admin” rights):
Screenshot%20from%202018-12-02%2021-03-12

IMO, you need not necessarily add the salary component in salary structure for Additional Salary to be added to salary slips. While processing payroll, any submitted Additional Salary in that particular payroll month are picked up.

Also, in your Salary Structure configuration for earnings, seem like the first component should just be base / 12 (without the + BO; as the Additional Salary will be added to the earnings total). I’m not sure if I understand your requirement correctly, it would nice if you can explain how the salary slip should look like so that we can have more ideas on how to set it up.

Need to test it out, maybe you can post an issue on GitHub.

This is because User Permissions are set for your Employee. You can remove the user permissions or uncheck required documents from the User permissions of the Employee.

hope this helps, thanks

Thank you for the reply. The bonus is automatically pulled into the salary slip from the Additional Salary section. That bit seems to work fine.

I tried many, many different salary structure calculations in an attempt to have it calculate the tax correctly. The one in the screenshot is just one of the attempts and while not completely accurate for calculating the tax it does demonstrate that tax is not calculated for bonuses EITHER when combined with salary OR individually. The rough calculations in the screenshot should be something like:
(base / 12) + BO
(80,000/12) + 10,000
6,666.67+10,000
16,666.67 (Salary inc Bonus, so BS is either 6,666.67 or 16,666.67)

Using the tax calc as:
(BS+BO-(70000/12))*0.33+(14020/12)

The tax should be (on BS 6,666.67 + BO 10,000):
(6666.67+10000-(70000/12))x0.33+(14020/12)
(6666.67+10000-5833)x0.33+1168
10,833.67x0.33+1168
4759.61 (Tax)

Or on BS = 16,666.67:
(16666.67-(70000/12))x0.33+(14020/12)
(16666.67-5833)x0.33+1168
10,833.67x0.33+1168
4759.61 (Tax)

Or on BS 16,666.67 plus BO 10,000 bonus total:
(16666.67+10000-(70000/12))x0.33+(14020/12)
(16666.67+10000-5833)x0.33+1168
20,833.67x0.33+1168
8,043 (Tax)

Clearly, no matter how this is calculated, if the bonus was used in tax calculations at all the tax would be MUCH higher than $1,443.11. How can I get the bonus to be processed under the same tax calculations?

Has nobody else had this issue occur? Does nobody have any suggestions?

I could imagine you would be able to get more feedback by changing your headline to something more specific and likewise narrow it down to the actual problem you are facing.

At the moment the headline is just a general blame on the “Additional Salary” functionality and puts the entire Topic into a negative frame in my eyes. Pining it down to the actual problem headline wise would be a more productive approach.

Even though I totally admit that the HR/Payroll Module is pretty complex and difficult to see through (I am struggling with understanding this myself at the moment) I think a more constructive ‘framing’ (referring to the headline of your Topic) would help to get past this matter.

1 Like

Your response is more unhelpful than the title. You added nothing of value. The title is entirely accurate - additional salary does not work at all, it IS completely broken. How else could I frame that? It doesn’t work as it’s supposed to. I made the issue very clear in my post, and in my reply to another member.

If you’re not happy with the title, let me know what you’d like me to change it to. But until then, “Additional Salary is completely broken” is an entirely accurate description of the issue.

hm, it’s not about me being happy, it’s about you getting valuable feedback. For sure it’s completely up to you to choose the most promising strategy to achieve what you’re after.

1 Like

Thanks for your problem report ChipwizBen

Yes suffice to say we all aim to add value - some general notes that may help

Salary Slip has some tests in place https://github.com/frappe/erpnext/blob/develop/erpnext/hr/doctype/salary_slip/test_salary_slip.py

But none (yet!) for Additional Salary or Salary Component (that are new or changed in v11 that currently is undergoing manual testing).
https://github.com/frappe/erpnext/blob/develop/erpnext/hr/doctype/additional_salary/test_additional_salary.py

https://github.com/frappe/erpnext/blob/develop/erpnext/hr/doctype/salary_component/test_salary_component.py

In June and September some changes and fixes were made
Rename - Additional Salary Component to Additional Salary by pjamsheer · Pull Request #14302 · frappe/erpnext · GitHub
Payroll fixes and more by nabinhait · Pull Request #15475 · frappe/erpnext · GitHub

Of course tests confirm that parts work - but also still work as expected too, since ERPNext is constantly evolving.

Tests also give ‘business use case’ examples that document how the parts are intended work together.

1 Like

In that case, i assume you are facing issues with Tax calculation. As I mentioned earlier, it seems to me more like a configuration issue. I can see a Bonus component in your Salary Structure and it seems you are again creating Additional Salary, which means the Additional Salary will get added to the Bonus component as setup in Salary Structure. I would suggest you to relook at the configurations.

Also, please see this documentation on how to configure tax correctly. And this for everything about setting up your payroll.

“In that case, i assume you are facing issues with Tax calculation.”

Yes, though that is just one of the issues. I was reminded of one of the other issues recently when trying to run this month’s salary payments. The “Restricted” issue is still current and added the Additional Salary to the payslips of users that I couldn’t access to remove. Here’s how to reproduce it:

  1. Create an Additional Salary entry for user X.
  2. Though it was added successfully, the entry vanishes from my view and am I totally unable to delete or edit any Additional Salary entries other than my own. I am a System Manager. Modifying Role Permissions does not have an effect and I simply could not edit or delete Additional Salary entries.
  3. The only way I managed to delete these rogue entries was to grant System Manager rights to every affected user, login as them, and delete the entry. I have to do this for every user. I don’t need to explain why giving every user Admin rights and changing their password to login as them to fix the issue is a bad idea.

“I can see a Bonus component in your Salary Structure and it seems you are again creating Additional Salary”

As I mentioned, I spent 6 hours on this single issue. I tried every possible way I could think of to get it to work correctly, and even repeated some methods just to be sure. The screenshots above are examples of some of the attempts and as noted previously: the screenshot is just one of the attempts and while not completely accurate for calculating the tax it does demonstrate that tax is not calculated for bonuses. It is one of many examples, none of which work correctly.

“I would suggest you to relook at the configurations.”

Did you try to use the Additional Salary system before suggesting that I go through the process again? I know that the issues aren’t fixed, I’m running the latest pull and all of the issues above remain.

If you can:

  1. Create Additional Salary for at least two employees
  2. Edit and/or delete those Additional Salaries by using just your own user
  3. Have those Additional Salary components process correctly for any tax calculation in a Salary Structure / Slip

…and all three work as expected on the current release, I’ll post a photo to this thread of myself holding a sign that says “ChipwizBen is a caveman”. I’ll give you a generous 7 days to show me that all 3 of those work in the current version before withdrawing the offer. After that, I’d like somebody to actually try to use the Additional Salary component before offering documentation to me that isn’t applicable to the issue.

This is because you have User Permissions set for for your user on Employee, try removing that. In version 11 while creating Employee, if the option “Create User Permission” is turned on, User Permissions for the Employee are automatically created. So, while creating Employee documents linked to HR Users, who should have access to other employee records, you should turn off this option to skip setting the User Permission.

Looking up the documentation would have helped you save those hours. Additional Salary, as the documentation clearly explains, is a means to add earning as well as deduction components to Salary Slips which are generated based on Salary Structure assigned to Employees.

Tax will be calculated on the Salary components as configured in the Salary Structure irrespective of whether it is Additional Salary or not. It all depends on how you have configured the salary structure. Ideally you can create a “statistical component” for all taxable salary components and use the statistical component to calculate the deduction to be applied. Or any other way whichever suits your requirement.

All users were created in V10. If by upgrading users have their permissions screwed up then that’s a bug. I’m not able to test this until tomorrow, but my user had System Manager role which should have had rights to edit Additional Salary.

Your response is not helpful at all. You link to documentation that has two paragraphs and assume that’s all you need to get it working? You think I’d waste six hours on what should be a simple component without reading the docs? You have absolutely no idea what you’re talking about and that would become apparent for you if you actually bothered to try to create Additional Salary components and link them to Salary components and payslips.

By replying with how you think it should work just pollutes the thread with unhelpful information. It’s clear that you haven’t properly read my first two comments either.

Like I detailed in my last comment, I encourage you to actually try to use the Additional Salary system before adding condescending comments and unhelpful documentation.

My guess is that the upgrade would not have done that. It would, if there were older versions of User Permission which got patched to the revised version. BTW, did you happen to create the Employee documents after the version upgrade?

For someone to get Additional Salary working, I’m pretty sure those two paragraphs are good enough.

It’s unfortunate you feel so, but my response was only about how the Additional Salary and Tax calculation in ERPNext works.

Take care

The employees, salary components and structures were created in V10. The additional salary was created in V11 and the V10 components and structures were modified to (attempt to) work with the additional salary.

The additional salary component does not work according to the documentation, or work at all for that matter.

Fair enough your conclusion is with the changes to v11, the docs and prescribed behaviour are not sufficiently clear and the code needs to be exercised more.

Test code, to point the way and detect breaking changes, would be a help here. Just sayin :wink:

Since v11 is undergoing testing best log your issue on github.com

edit: Another issue is this one too Salary Slip Override Salary Structure Component Formula Result - #7 by ChipwizBen

Issues · frappe/erpnext · GitHub to be precise

1 Like

I’m a little surprised and a bit concerned that so many folk are using V11 (only a staging release) in production.

Currently V10 is the production release , originally released as on Dec 25 2017. Ie it has had over a years worth of bug fixes and tweaks to get it to the ultra stable condition it has now.

I personally would never upgrade to a staging release unless several conditions are met :-

  1. You have very limited exposure to the application. What I mean is that say you are only using it in a very limited way with just a couple of fairly benign not mission critical purposes esp not anything to do with accounting or payroll. There were a mass of improvements to accounts in V11 so there equally will be a mass of bugs, some big, some small to wade through.
  2. I had the services of extremely good developers on hand, who regularly provide commits to the core and understand innately what is there. Any ERP system is a massive and immensely rich but complicated system.
  3. Almost any other software especially Open Source projects will have bugs with the first X.00 release of any software. We have not even reached a X.00 release as yet with V11. Perhaps the numbering is confusing. You must wait until a good number of the bugs are first identified and then fixed before wading in.
    Odoo has traditionally had the same release ideology. It was and probably still is regarded that you should wait at least 3-6 months after a main X.00 release was out before you could properly use it in production.
  4. You should test, test, and test on a separate non production server before going to into production on any mission critical application. Virtual machines with snapshotting capabilities are great here.
  5. Some parts of ERPNext have had massive changes in V11 but a few have had very little changes made. If you have limited exposure as in 1) and are using areas where there haven’t been wholesale changes to the code you may be ok to go in early.

Yes ERPNext has bugs, all software does but to complain that a feature that is entirely new and is still regarded as a testing release seems quite naive to me.

I for one won’t be using V11 until at least many weeks or probably months after it’s been released properly and having tested it fully on a separate server for my own users needs regarding the modules we use.

So please post your bugs so these can get looked at but don’t assume V11 staging is perfect just now as it isn’t.

1 Like

@Julian_Robbins “I’m a little surprised and a bit concerned that so many folk are using V11 (only a staging release) in production.”

Why should you be surprised? The V11 “release” has been a total shambles. It’s plastered all over erpnext.org as a release:

ERPNext Version 11

The biggest ERPNext release is here, with more feature, security, usability and performance updates than ever before.

https://erpnext.org/releases/version-11

It was on the front page of erpnext.org until recently with much fanfare and a feature list.

The current documentation is for V11 and that was highlighted earlier in the thread with this link to V11 only components:
https://erpnext.org/docs/user/manual/en/human-resources/payroll/additional-salary

And I only found out that the documentation was for V11 by asking a question in this forum back in September, as the documentation didn’t match the current release (V10): Missing Pages in HR / Additional Salary

So to recap:

  • The front page of the website announced its “release”
  • The current erpnext.org menu has a blue highlight next to Version 11. Nowhere on that page does it mention that it’s not a current release
  • The current documentation is for V11 - I haven’t even been able to find documentation for V10
  • Version 10 was actively announcing V11 in the notification panel when you login (How to turn off nagging notification about new version - #8)

In other words, I’m surprised that you’re surprised that people are using V11.

Good try Julian!

You may have to extend your offer or best seek paid support here :slight_smile:

1 Like

Any good news update on problem solved here?