[UPDT] PAYROLL: Contribution deduction filteration updation
This commit is contained in:
@@ -42,5 +42,5 @@ def get_active_employees(request):
|
||||
"""
|
||||
This method used to return the deduction
|
||||
"""
|
||||
employees = Employee.objects.filter(is_active=True,contract_set__isnull=False)
|
||||
employees = Employee.objects.filter(is_active=True,contract_set__isnull=False,payslip__isnull=False).distinct()
|
||||
return {"get_active_employees": employees}
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
<span class="oh-profile__name oh-text--dark">{{ deduction.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oh-sticky-table__td">{{ currency }} {{ deduction.employee_contribution }}</div>
|
||||
<div class="oh-sticky-table__td">{{ currency }} {{ deduction.employer_contribution }}</div>
|
||||
<div class="oh-sticky-table__td">{{ currency }} {{ deduction.employee_contribution|floatformat:2 }}</div>
|
||||
<div class="oh-sticky-table__td">{{ currency }} {{ deduction.employer_contribution|floatformat:2 }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if not contribution_deductions %}
|
||||
|
||||
@@ -1420,16 +1420,16 @@ def get_contribution_report(request):
|
||||
item["employer_contribution_amount"] for item in group
|
||||
)
|
||||
total_contribution = employee_contribution + employer_contribution
|
||||
|
||||
contribution_deductions.append(
|
||||
{
|
||||
"deduction_id": deduction_id,
|
||||
"title": title,
|
||||
"employee_contribution": employee_contribution,
|
||||
"employer_contribution": employer_contribution,
|
||||
"total_contribution": total_contribution,
|
||||
}
|
||||
)
|
||||
if employer_contribution > 0:
|
||||
contribution_deductions.append(
|
||||
{
|
||||
"deduction_id": deduction_id,
|
||||
"title": title,
|
||||
"employee_contribution": employee_contribution,
|
||||
"employer_contribution": employer_contribution,
|
||||
"total_contribution": total_contribution,
|
||||
}
|
||||
)
|
||||
|
||||
return render(
|
||||
request,
|
||||
|
||||
Reference in New Issue
Block a user