{% extends "base.html" %} {% block content %}

Manage Salary Components

Add, rename or remove earning, deduction and CTC heads.
Add Earning Component
Existing Earnings
{{ earning_heads|length }} items
{% if earning_heads %}
{% for head in earning_heads %} {% set used_struct = e_struct.get(head.id, 0) %} {% set used_form = e_form.get(head.id, 0) %} {% set used_frozen = e_frozen.get(head.id, 0) %} {% set used_total = used_struct + used_form + used_frozen %} {% endfor %}
Name Description Used by Actions
{{ used_struct }} Struct {{ used_form }} Formula {{ used_frozen }} Frozen
{% else %}
No earning components yet. Use the form above to add one.
{% endif %}
Add Deduction Component
Existing Deductions
{{ deduction_heads|length }} items
{% if deduction_heads %}
{% for head in deduction_heads %} {% set used_struct = d_struct.get(head.id, 0) %} {% set used_form = d_form.get(head.id, 0) %} {% set used_frozen = d_frozen.get(head.id, 0) %} {% set used_total = used_struct + used_form + used_frozen %} {% endfor %}
Name Description Used by Actions
{{ used_struct }} Struct {{ used_form }} Formula {{ used_frozen }} Frozen
{% else %}
No deduction components yet. Use the form above to add one.
{% endif %}
{% if ctc_heads is not none %}
Add CTC Component
Existing CTC Components
{{ ctc_heads|length }} items
{% if ctc_heads %}
{% for head in ctc_heads %} {% set used_struct = c_struct.get(head.id, 0) %} {% set used_form = c_form.get(head.id, 0) %} {% set used_frozen = c_frozen.get(head.id, 0) %} {% set used_total = used_struct + used_form + used_frozen %} {% endfor %}
Name Description Used by Actions
{{ used_struct }} Struct {{ used_form }} Formula {{ used_frozen }} Frozen
{% else %}
No CTC components yet. Use the form above to add one.
{% endif %}
{% endif %}
Delete safety: Deletion is blocked if the component is used in any salary structure, formula, or frozen payroll. Renaming is allowed; historical frozen slips keep the original head name.
{% endblock %}