Max limit was not taken when creating Deduction based on Gross pay and taxable Gross pay. (#559)
This commit is contained in:
committed by
GitHub
parent
aef8171c47
commit
dc73868f42
@@ -817,9 +817,11 @@ def calculate_based_on_gross_pay(*_args, **kwargs):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
component = kwargs["component"]
|
component = kwargs["component"]
|
||||||
|
day_dict = kwargs["day_dict"]
|
||||||
gross_pay = calculate_gross_pay(**kwargs)
|
gross_pay = calculate_gross_pay(**kwargs)
|
||||||
rate = component.rate
|
rate = component.rate
|
||||||
amount = gross_pay["gross_pay"] * rate / 100
|
amount = gross_pay["gross_pay"] * rate / 100
|
||||||
|
amount = compute_limit(component, amount,day_dict)
|
||||||
return amount
|
return amount
|
||||||
|
|
||||||
|
|
||||||
@@ -840,10 +842,12 @@ def calculate_based_on_taxable_gross_pay(*_args, **kwargs):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
component = kwargs["component"]
|
component = kwargs["component"]
|
||||||
|
day_dict = kwargs["day_dict"]
|
||||||
taxable_gross_pay = calculate_taxable_gross_pay(**kwargs)
|
taxable_gross_pay = calculate_taxable_gross_pay(**kwargs)
|
||||||
taxable_gross_pay = taxable_gross_pay["taxable_gross_pay"]
|
taxable_gross_pay = taxable_gross_pay["taxable_gross_pay"]
|
||||||
rate = component.rate
|
rate = component.rate
|
||||||
amount = taxable_gross_pay * rate / 100
|
amount = taxable_gross_pay * rate / 100
|
||||||
|
amount = compute_limit(component, amount,day_dict)
|
||||||
return amount
|
return amount
|
||||||
|
|
||||||
|
|
||||||
@@ -861,8 +865,6 @@ def calculate_based_on_net_pay(component, net_pay, day_dict):
|
|||||||
"""
|
"""
|
||||||
rate = float(component.rate)
|
rate = float(component.rate)
|
||||||
amount = net_pay * rate / 100
|
amount = net_pay * rate / 100
|
||||||
amount = compute_limit(component, amount, day_dict)
|
|
||||||
|
|
||||||
amount = compute_limit(component, amount, day_dict)
|
amount = compute_limit(component, amount, day_dict)
|
||||||
return amount
|
return amount
|
||||||
|
|
||||||
@@ -898,9 +900,7 @@ def calculate_based_on_attendance(*_args, **kwargs):
|
|||||||
attendance_validated=True,
|
attendance_validated=True,
|
||||||
).count()
|
).count()
|
||||||
amount = count * component.per_attendance_fixed_amount
|
amount = count * component.per_attendance_fixed_amount
|
||||||
|
|
||||||
amount = compute_limit(component, amount, day_dict)
|
amount = compute_limit(component, amount, day_dict)
|
||||||
|
|
||||||
return amount
|
return amount
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user