-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Payroll "Configuration" modal will increase the base salary indefinitely if the currency is switched too many times. #7966
Comments
I'm going to tackle this in my latest HR refactor. |
So, according to our documentation (https://docs.bhi.ma/fr/payroll/payroll_multiple), the employees are always paid in the enterprise currency. Therefore, this currency selection should only change the view value. However, this presents a problem. What happens if the user changes to view in a different currency (for example, USD$ instead of the enterprise FC), then makes a change to the base salary or advantages? What do we do? Do we modify the value using the exchange rate of today? And what happens if the employee goes to be paid later (say, a week later)? Do we use the exchange rate of the configuration date or the payment date? To avoid this confusion, I propose we remove the ability to be change currencies on this configuration modal. I think it just makes things confusing, and buggy. Instead, the salary will be fixed in the enterprise currency and paid using whatever currency they want at the cashbox. @lomamech what do you think of the idea to remove the currency change on this page? Will it cause any issue for any production site? For example, IMCK? |
A different option is that we could keep the ability to change currency, but erase all changes the user made to salary values when they switch currencies. This would allow the user to modify the salary of an employee or benefits, in a non-enterprise currency, if that is needed. However, it would guarantee that we can't get into this kind of cycle bug where we keep running the |
I am going with the option of removing the currency from this modal, since production sites do not seem to choose other currencies in their configuration anyway. See #4956 (comment) for more context. |
Complete rewrite of the multiple_payroll payment configuration modal to be less brittle and provide a better user experience. I've completely removed the option for the user to set the currency since no production sites were using it in practice, and it had some serious bugs. This reduces the number of imports into the modal and removes the need to do any currency conversion. Additionally, I've provided additionally context in the modal about the employee, their grade, function, number of dependents, etc., to give the user all the context needed for configuration of the employee. Closes Third-Culture-Software#7966.
In the
Human Resources
>Payroll Multiple
configuration modal for an individual employee, when a user changes the currency two unexpected things occur:bh-currency-input
does not update (it always shows the enterprise currency, I would assume).Here is a demonstration of the bug:
When fixing this issue, the following improvements could also be made:
disabled
inputs, let's just use Static Controls to render the options that cannot be displayed.The text was updated successfully, but these errors were encountered: