Skip to content
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

fix(SalarySlip): use the correct variable for the function in _get_days_outside_period #2620

Open
wants to merge 1 commit into
base: version-14-hotfix
Choose a base branch
from

Conversation

NethminaHiker360
Copy link

@NethminaHiker360 NethminaHiker360 commented Jan 10, 2025

Changing the line from date = add_days(self.end_date, -day) to date = add_days(end_date, -day) ensures that the function uses the correct end_date parameter passed to it, rather than an instance variable self.end_date. This change aligns with the function's requirements and ensures that the calculation is based on the correct date values provided as arguments.

By making this change, the function will correctly calculate the days outside the period, preventing negative values in the absent_days field. This leads to accurate payment days and correct salary slip calculations for employees, especially those joining mid-month.

closes #2612

backport version-14

@NethminaHiker360 NethminaHiker360 changed the title fix(SalarySlip): use correct variable fix(SalarySlip): use correct variable for _get_days_outside_period function Jan 10, 2025
@NethminaHiker360 NethminaHiker360 changed the title fix(SalarySlip): use correct variable for _get_days_outside_period function fix(SalarySlip): use correct variable for _get_days_outside_period() function Jan 10, 2025
@NethminaHiker360 NethminaHiker360 changed the title fix(SalarySlip): use correct variable for _get_days_outside_period() function fix(SalarySlip): use correct variable for _get_days_outside_period function Jan 10, 2025
@NethminaHiker360 NethminaHiker360 changed the title fix(SalarySlip): use correct variable for _get_days_outside_period function fix(SalarySlip): use the correct variable for the function in _get_days_outside_period Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant