fix: sider
This commit is contained in:
parent
1446749b63
commit
3278d02cd2
@ -116,7 +116,7 @@ def calculate_work_experience(employee, gratuity_rule):
|
|||||||
employee_total_workings_days = calculate_employee_total_workings_days(employee, date_of_joining, relieving_date)
|
employee_total_workings_days = calculate_employee_total_workings_days(employee, date_of_joining, relieving_date)
|
||||||
|
|
||||||
current_work_experience = employee_total_workings_days/total_working_days_per_year or 1
|
current_work_experience = employee_total_workings_days/total_working_days_per_year or 1
|
||||||
current_work_experience = get_work_experience_using_method(method, current_work_experience, minimum_year_for_gratuity)
|
current_work_experience = get_work_experience_using_method(method, current_work_experience, minimum_year_for_gratuity, employee)
|
||||||
return current_work_experience
|
return current_work_experience
|
||||||
|
|
||||||
def calculate_employee_total_workings_days(employee, date_of_joining, relieving_date ):
|
def calculate_employee_total_workings_days(employee, date_of_joining, relieving_date ):
|
||||||
@ -132,7 +132,7 @@ def calculate_employee_total_workings_days(employee, date_of_joining, relieving_
|
|||||||
|
|
||||||
return employee_total_workings_days
|
return employee_total_workings_days
|
||||||
|
|
||||||
def get_work_experience_using_method(method, current_work_experience, minimum_year_for_gratuity):
|
def get_work_experience_using_method(method, current_work_experience, minimum_year_for_gratuity, employee):
|
||||||
if method == "Round off Work Experience":
|
if method == "Round off Work Experience":
|
||||||
current_work_experience = round(current_work_experience)
|
current_work_experience = round(current_work_experience)
|
||||||
else:
|
else:
|
||||||
@ -174,7 +174,7 @@ def calculate_gratuity_amount(employee, gratuity_rule, experience):
|
|||||||
if calculate_gratuity_amount_based_on == "Current Slab":
|
if calculate_gratuity_amount_based_on == "Current Slab":
|
||||||
slab_found, gratuity_amount = calculate_amount_based_on_current_slab(slab.from_year, slab.to_year,
|
slab_found, gratuity_amount = calculate_amount_based_on_current_slab(slab.from_year, slab.to_year,
|
||||||
experience, total_applicable_components_amount, slab.fraction_of_applicable_earnings)
|
experience, total_applicable_components_amount, slab.fraction_of_applicable_earnings)
|
||||||
if slab_found == True:
|
if slab_found:
|
||||||
break
|
break
|
||||||
|
|
||||||
elif calculate_gratuity_amount_based_on == "Sum of all previous slabs":
|
elif calculate_gratuity_amount_based_on == "Sum of all previous slabs":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user