-
Notifications
You must be signed in to change notification settings - Fork 803
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: set correct work experience during gratuity calculation (backport #2460) #2502
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit a8a92ad)
(cherry picked from commit ce75e4e)
(cherry picked from commit da17577) # Conflicts: # .git-blame-ignore-revs # .github/helper/install.sh # .github/workflows/ci.yml # .github/workflows/initiate_release.yml # .github/workflows/on_release.yml # .mergify.yml # .releaserc # MANIFEST.in # README.md # hrms/__init__.py # hrms/controllers/tests/test_employee_reminders.py # hrms/hooks.py # hrms/hr/doctype/appointment_letter/appointment_letter.json # hrms/hr/doctype/appointment_letter/test_appointment_letter.py # hrms/hr/doctype/appointment_letter_content/appointment_letter_content.json # hrms/hr/doctype/appointment_letter_template/appointment_letter_template.json # hrms/hr/doctype/appointment_letter_template/test_appointment_letter_template.py # hrms/hr/doctype/appraisal/appraisal.json # hrms/hr/doctype/appraisal/test_appraisal.py # hrms/hr/doctype/appraisal_cycle/appraisal_cycle.json # hrms/hr/doctype/appraisal_cycle/test_appraisal_cycle.py # hrms/hr/doctype/appraisal_goal/appraisal_goal.json # hrms/hr/doctype/appraisal_kra/appraisal_kra.json # hrms/hr/doctype/appraisal_template/appraisal_template.json # hrms/hr/doctype/appraisal_template/test_appraisal_template.py # hrms/hr/doctype/appraisal_template_goal/appraisal_template_goal.json # hrms/hr/doctype/appraisee/appraisee.json # hrms/hr/doctype/attendance/attendance.json # hrms/hr/doctype/attendance/test_attendance.py # hrms/hr/doctype/attendance_request/attendance_request.json # hrms/hr/doctype/attendance_request/test_attendance_request.py # hrms/hr/doctype/compensatory_leave_request/compensatory_leave_request.json # hrms/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py # hrms/hr/doctype/daily_work_summary/daily_work_summary.json # hrms/hr/doctype/daily_work_summary/test_daily_work_summary.py # hrms/hr/doctype/daily_work_summary_group/daily_work_summary_group.json # hrms/hr/doctype/daily_work_summary_group_user/daily_work_summary_group_user.json # hrms/hr/doctype/department_approver/department_approver.json # hrms/hr/doctype/designation_skill/designation_skill.json # hrms/hr/doctype/employee_advance/employee_advance.json # hrms/hr/doctype/employee_advance/test_employee_advance.py # hrms/hr/doctype/employee_attendance_tool/employee_attendance_tool.json # hrms/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.py # hrms/hr/doctype/employee_boarding_activity/employee_boarding_activity.json # hrms/hr/doctype/employee_checkin/employee_checkin.json # hrms/hr/doctype/employee_checkin/test_employee_checkin.py # hrms/hr/doctype/employee_feedback_criteria/employee_feedback_criteria.json # hrms/hr/doctype/employee_feedback_criteria/test_employee_feedback_criteria.py # hrms/hr/doctype/employee_feedback_rating/employee_feedback_rating.json # hrms/hr/doctype/employee_grade/employee_grade.json # hrms/hr/doctype/employee_grade/test_employee_grade.py # hrms/hr/doctype/employee_grievance/employee_grievance.json # hrms/hr/doctype/employee_grievance/test_employee_grievance.py # hrms/hr/doctype/employee_health_insurance/employee_health_insurance.json # hrms/hr/doctype/employee_health_insurance/test_employee_health_insurance.py # hrms/hr/doctype/employee_onboarding/employee_onboarding.json # hrms/hr/doctype/employee_onboarding/test_employee_onboarding.py # hrms/hr/doctype/employee_onboarding_template/employee_onboarding_template.json # hrms/hr/doctype/employee_onboarding_template/test_employee_onboarding_template.py # hrms/hr/doctype/employee_performance_feedback/employee_performance_feedback.json # hrms/hr/doctype/employee_performance_feedback/test_employee_performance_feedback.py # hrms/hr/doctype/employee_promotion/employee_promotion.json # hrms/hr/doctype/employee_promotion/test_employee_promotion.py # hrms/hr/doctype/employee_property_history/employee_property_history.json # hrms/hr/doctype/employee_referral/employee_referral.json # hrms/hr/doctype/employee_referral/test_employee_referral.py # hrms/hr/doctype/employee_separation/employee_separation.json # hrms/hr/doctype/employee_separation/test_employee_separation.py # hrms/hr/doctype/employee_separation_template/employee_separation_template.json # hrms/hr/doctype/employee_separation_template/test_employee_separation_template.py # hrms/hr/doctype/employee_skill/employee_skill.json # hrms/hr/doctype/employee_skill_map/employee_skill_map.json # hrms/hr/doctype/employee_training/employee_training.json # hrms/hr/doctype/employee_transfer/employee_transfer.json # hrms/hr/doctype/employee_transfer/test_employee_transfer.py # hrms/hr/doctype/employment_type/employment_type.json # hrms/hr/doctype/exit_interview/exit_interview.json # hrms/hr/doctype/exit_interview/test_exit_interview.py # hrms/hr/doctype/expected_skill_set/expected_skill_set.json # hrms/hr/doctype/expense_claim/expense_claim.json # hrms/hr/doctype/expense_claim/test_expense_claim.py # hrms/hr/doctype/expense_claim_account/expense_claim_account.json # hrms/hr/doctype/expense_claim_advance/expense_claim_advance.json # hrms/hr/doctype/expense_claim_detail/expense_claim_detail.json # hrms/hr/doctype/expense_claim_type/expense_claim_type.json # hrms/hr/doctype/expense_claim_type/test_expense_claim_type.py # hrms/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.json # hrms/hr/doctype/full_and_final_asset/full_and_final_asset.json # hrms/hr/doctype/full_and_final_asset/test_full_and_final_asset.py # hrms/hr/doctype/full_and_final_outstanding_statement/full_and_final_outstanding_statement.json # hrms/hr/doctype/full_and_final_statement/full_and_final_statement.json # hrms/hr/doctype/full_and_final_statement/test_full_and_final_statement.py # hrms/hr/doctype/goal/goal.json # hrms/hr/doctype/goal/test_goal.py # hrms/hr/doctype/grievance_type/grievance_type.json # hrms/hr/doctype/grievance_type/test_grievance_type.py # hrms/hr/doctype/hr_settings/hr_settings.json # hrms/hr/doctype/hr_settings/test_hr_settings.py # hrms/hr/doctype/identification_document_type/identification_document_type.json # hrms/hr/doctype/identification_document_type/test_identification_document_type.py # hrms/hr/doctype/interest/interest.json # hrms/hr/doctype/interest/test_interest.py # hrms/hr/doctype/interview/interview.json # hrms/hr/doctype/interview/interview.py # hrms/hr/doctype/interview/test_interview.py # hrms/hr/doctype/interview_detail/interview_detail.json # hrms/hr/doctype/interview_feedback/interview_feedback.json # hrms/hr/doctype/interview_feedback/test_interview_feedback.py # hrms/hr/doctype/interview_round/interview_round.json # hrms/hr/doctype/interview_round/test_interview_round.py # hrms/hr/doctype/interview_type/interview_type.json # hrms/hr/doctype/interview_type/test_interview_type.py # hrms/hr/doctype/interviewer/interviewer.json # hrms/hr/doctype/job_applicant/job_applicant.json # hrms/hr/doctype/job_applicant/job_applicant_dashboard.html # hrms/hr/doctype/job_applicant/test_job_applicant.py # hrms/hr/doctype/job_applicant_source/job_applicant_source.json # hrms/hr/doctype/job_applicant_source/test_job_applicant_source.py # hrms/hr/doctype/job_offer/job_offer.json # hrms/hr/doctype/job_offer/test_job_offer.py # hrms/hr/doctype/job_offer_term/job_offer_term.json # hrms/hr/doctype/job_offer_term_template/job_offer_term_template.json # hrms/hr/doctype/job_offer_term_template/test_job_offer_term_template.py # hrms/hr/doctype/job_opening/job_opening.json # hrms/hr/doctype/job_opening/test_job_opening.py # hrms/hr/doctype/job_requisition/job_requisition.json # hrms/hr/doctype/job_requisition/test_job_requisition.py # hrms/hr/doctype/kra/kra.json # hrms/hr/doctype/kra/test_kra.py # hrms/hr/doctype/leave_allocation/leave_allocation.json # hrms/hr/doctype/leave_allocation/test_earned_leaves.py # hrms/hr/doctype/leave_allocation/test_leave_allocation.py # hrms/hr/doctype/leave_application/leave_application.json # hrms/hr/doctype/leave_application/leave_application.py # hrms/hr/doctype/leave_application/test_leave_application.py # hrms/hr/doctype/leave_block_list/leave_block_list.json # hrms/hr/doctype/leave_block_list/test_leave_block_list.py # hrms/hr/doctype/leave_block_list_allow/leave_block_list_allow.json # hrms/hr/doctype/leave_block_list_date/leave_block_list_date.json # hrms/hr/doctype/leave_control_panel/leave_control_panel.json # hrms/hr/doctype/leave_control_panel/test_leave_control_panel.py # hrms/hr/doctype/leave_encashment/leave_encashment.json # hrms/hr/doctype/leave_encashment/test_leave_encashment.py # hrms/hr/doctype/leave_ledger_entry/leave_ledger_entry.json # hrms/hr/doctype/leave_ledger_entry/test_leave_ledger_entry.py # hrms/hr/doctype/leave_period/leave_period.json # hrms/hr/doctype/leave_period/test_leave_period.py # hrms/hr/doctype/leave_policy/leave_policy.json # hrms/hr/doctype/leave_policy/test_leave_policy.py # hrms/hr/doctype/leave_policy_assignment/leave_policy_assignment.json # hrms/hr/doctype/leave_policy_assignment/test_leave_policy_assignment.py # hrms/hr/doctype/leave_policy_detail/leave_policy_detail.json # hrms/hr/doctype/leave_policy_detail/test_leave_policy_detail.py # hrms/hr/doctype/leave_type/leave_type.json # hrms/hr/doctype/offer_term/offer_term.json # hrms/hr/doctype/offer_term/test_offer_term.py # hrms/hr/doctype/purpose_of_travel/purpose_of_travel.json # hrms/hr/doctype/purpose_of_travel/test_purpose_of_travel.py # hrms/hr/doctype/pwa_notification/pwa_notification.json # hrms/hr/doctype/pwa_notification/test_pwa_notification.py # hrms/hr/doctype/shift_assignment/shift_assignment.json # hrms/hr/doctype/shift_assignment/test_shift_assignment.py # hrms/hr/doctype/shift_assignment_schedule/test_shift_assignment_schedule.py # hrms/hr/doctype/shift_assignment_tool/test_shift_assignment_tool.py # hrms/hr/doctype/shift_location/test_shift_location.py # hrms/hr/doctype/shift_request/shift_request.json # hrms/hr/doctype/shift_request/test_shift_request.py # hrms/hr/doctype/shift_type/shift_type.json # hrms/hr/doctype/shift_type/test_shift_type.py # hrms/hr/doctype/skill/skill.json # hrms/hr/doctype/skill_assessment/skill_assessment.json # hrms/hr/doctype/staffing_plan/staffing_plan.json # hrms/hr/doctype/staffing_plan/test_staffing_plan.py # hrms/hr/doctype/staffing_plan_detail/staffing_plan_detail.json # hrms/hr/doctype/training_event/test_training_event.py # hrms/hr/doctype/training_event/training_event.json # hrms/hr/doctype/training_event_employee/training_event_employee.json # hrms/hr/doctype/training_feedback/test_training_feedback.py # hrms/hr/doctype/training_feedback/training_feedback.json # hrms/hr/doctype/training_program/test_training_program.py # hrms/hr/doctype/training_program/training_program.json # hrms/hr/doctype/training_result/test_training_result.py # hrms/hr/doctype/training_result/training_result.json # hrms/hr/doctype/training_result_employee/training_result_employee.json # hrms/hr/doctype/travel_itinerary/travel_itinerary.json # hrms/hr/doctype/travel_request/test_travel_request.py # hrms/hr/doctype/upload_attendance/test_upload_attendance.py # hrms/hr/doctype/upload_attendance/upload_attendance.json # hrms/hr/doctype/vehicle_log/test_vehicle_log.py # hrms/hr/doctype/vehicle_log/vehicle_log.json # hrms/hr/doctype/vehicle_service/vehicle_service.json # hrms/hr/doctype/vehicle_service_item/test_vehicle_service_item.py # hrms/hr/doctype/vehicle_service_item/vehicle_service_item.json # hrms/hr/page/organizational_chart/test_organizational_chart.py # hrms/hr/report/appraisal_overview/test_appraisal_overview.py # hrms/hr/report/employee_exits/test_employee_exits.py # hrms/hr/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py # hrms/hr/report/employee_leave_balance/test_employee_leave_balance.py # hrms/hr/report/employee_leave_balance_summary/test_employee_leave_balance_summary.py # hrms/hr/report/employees_working_on_a_holiday/test_employees_working_on_a_holiday.py # hrms/hr/report/leave_ledger/test_leave_ledger.py # hrms/hr/report/monthly_attendance_sheet/test_monthly_attendance_sheet.py # hrms/hr/report/project_profitability/test_project_profitability.py # hrms/hr/report/shift_attendance/test_shift_attendance.py # hrms/hr/report/vehicle_expenses/test_vehicle_expenses.py # hrms/hr/workspace/shift_&_attendance/shift_&_attendance.json # hrms/payroll/doctype/additional_salary/additional_salary.json # hrms/payroll/doctype/additional_salary/test_additional_salary.py # hrms/payroll/doctype/bulk_salary_structure_assignment/bulk_salary_structure_assignment.json # hrms/payroll/doctype/bulk_salary_structure_assignment/test_bulk_salary_structure_assignment.py # hrms/payroll/doctype/employee_benefit_application/employee_benefit_application.json # hrms/payroll/doctype/employee_benefit_application/test_employee_benefit_application.py # hrms/payroll/doctype/employee_benefit_application_detail/employee_benefit_application_detail.json # hrms/payroll/doctype/employee_benefit_claim/employee_benefit_claim.json # hrms/payroll/doctype/employee_benefit_claim/test_employee_benefit_claim.py # hrms/payroll/doctype/employee_cost_center/employee_cost_center.json # hrms/payroll/doctype/employee_incentive/employee_incentive.json # hrms/payroll/doctype/employee_incentive/test_employee_incentive.py # hrms/payroll/doctype/employee_other_income/employee_other_income.json # hrms/payroll/doctype/employee_other_income/test_employee_other_income.py # hrms/payroll/doctype/employee_tax_exemption_category/employee_tax_exemption_category.json # hrms/payroll/doctype/employee_tax_exemption_category/test_employee_tax_exemption_category.py # hrms/payroll/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.json # hrms/payroll/doctype/employee_tax_exemption_declaration/test_employee_tax_exemption_declaration.py # hrms/payroll/doctype/employee_tax_exemption_declaration_category/employee_tax_exemption_declaration_category.json # hrms/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.json # hrms/payroll/doctype/employee_tax_exemption_proof_submission/test_employee_tax_exemption_proof_submission.py # hrms/payroll/doctype/employee_tax_exemption_proof_submission_detail/employee_tax_exemption_proof_submission_detail.json # hrms/payroll/doctype/employee_tax_exemption_sub_category/employee_tax_exemption_sub_category.json # hrms/payroll/doctype/employee_tax_exemption_sub_category/test_employee_tax_exemption_sub_category.py # hrms/payroll/doctype/gratuity/gratuity.json # hrms/payroll/doctype/gratuity/gratuity.py # hrms/payroll/doctype/gratuity/test_gratuity.py # hrms/payroll/doctype/gratuity_applicable_component/gratuity_applicable_component.json # hrms/payroll/doctype/gratuity_rule/gratuity_rule.json # hrms/payroll/doctype/gratuity_rule/test_gratuity_rule.py # hrms/payroll/doctype/gratuity_rule_slab/gratuity_rule_slab.json # hrms/payroll/doctype/income_tax_slab/income_tax_slab.json # hrms/payroll/doctype/income_tax_slab/test_income_tax_slab.py # hrms/payroll/doctype/income_tax_slab_other_charges/income_tax_slab_other_charges.json # hrms/payroll/doctype/payroll_employee_detail/payroll_employee_detail.json # hrms/payroll/doctype/payroll_entry/payroll_entry.json # hrms/payroll/doctype/payroll_period/payroll_period.json # hrms/payroll/doctype/payroll_period/test_payroll_period.py # hrms/payroll/doctype/payroll_period_date/payroll_period_date.json # hrms/payroll/doctype/payroll_settings/payroll_settings.json # hrms/payroll/doctype/payroll_settings/test_payroll_settings.py # hrms/payroll/doctype/retention_bonus/retention_bonus.json # hrms/payroll/doctype/retention_bonus/test_retention_bonus.py # hrms/payroll/doctype/salary_component/salary_component.json # hrms/payroll/doctype/salary_component/test_salary_component.py # hrms/payroll/doctype/salary_component_account/salary_component_account.json # hrms/payroll/doctype/salary_detail/salary_detail.json # hrms/payroll/doctype/salary_slip/salary_slip.json # hrms/payroll/doctype/salary_slip/test_salary_slip.py # hrms/payroll/doctype/salary_slip_leave/salary_slip_leave.json # hrms/payroll/doctype/salary_slip_timesheet/salary_slip_timesheet.json # hrms/payroll/doctype/salary_structure/salary_structure.json # hrms/payroll/doctype/salary_structure/test_salary_structure.py # hrms/payroll/doctype/salary_structure_assignment/salary_structure_assignment.json # hrms/payroll/doctype/salary_structure_assignment/test_salary_structure_assignment.py # hrms/payroll/doctype/salary_withholding/test_salary_withholding.py # hrms/payroll/doctype/taxable_salary_slab/taxable_salary_slab.json # hrms/payroll/report/income_tax_computation/test_income_tax_computation.py # hrms/payroll/report/income_tax_deductions/test_income_tax_deductions.py # hrms/payroll/report/salary_register/salary_register.py # pyproject.toml # yarn.lock
Cherry-pick of da17577 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix work experience calculation for gratuity rules using the Take Exact Completed Years method. Previously, the experience was rounded to a whole number instead of using the exact decimal value (eg. 1.4 years was incorrectly treated as 1 year).
Gratuity Rule:
Before:
After:
This is an automatic backport of pull request #2460 done by [Mergify](https://mergify.com).