[UPDT] PAYROLL: Change input field id

This commit is contained in:
Horilla
2024-09-21 15:52:53 +05:30
parent 870d4e0079
commit 5f8f500410
2 changed files with 4 additions and 4 deletions

View File

@@ -28,9 +28,9 @@
<div class="d-flex">
<div class="oh-switch">
{% if perms.payroll.change_PayslipAutoGenerate %}
<input type="checkbox" id="GTIsActivate" data-id ="{{auto.id}}" class="oh-switch__checkbox" {% if auto.auto_generate %} checked {% endif %} onchange="updateAutoPayslipIsActivate(this)">
<input type="checkbox" id="PayslipAutoGenerateActivate" data-id ="{{auto.id}}" class="oh-switch__checkbox" {% if auto.auto_generate %} checked {% endif %} onchange="updateAutoPayslipIsActivate(this)">
{% else %}
<input type="checkbox" id="GTIsActivate" class="oh-switch__checkbox" {% if auto.auto_generate %} checked {% endif %} disabled>
<input type="checkbox" id="PayslipAutoGenerateActivate" class="oh-switch__checkbox" {% if auto.auto_generate %} checked {% endif %} disabled>
{% endif %}
</div>
</div>

View File

@@ -1736,9 +1736,9 @@ def create_or_update_auto_payslip(request, auto_id=None):
@permission_required("payroll.change_PayslipAutoGenerate")
def activate_auto_payslip_generate(request):
"""
ajax function to update is active field in grace time.
ajax function to update is active field in PayslipAutoGenerate.
Args:
- isChecked: Boolean value representing the state of grace time,
- isChecked: Boolean value representing the state of PayslipAutoGenerate,
- autoId: Id of PayslipAutoGenerate object
"""
isChecked = request.POST.get("isChecked")