To exclude the don not include in total components from print format
{%- for row in doc.earnings -%}
{% if row.do_not_include_in_total == 0 %}
{% endif %}
{%- endfor -%}
{{ _("Sr") }} |
{{ _("Component") }} |
{{ _("Amount") }} |
{{ row.idx }} |
{{ row.salary_component }} |
{{ row.amount }} |
Similarly can be done for deductions
{%- for row in doc.deductions -%}
{% if row.do_not_include_in_total == 0 %}
{% endif %}
{%- endfor -%}
{{ _("Sr") }} |
{{ _("Component") }} |
{{ _("Amount") }} |
{{ row.idx }} |
{{ row.salary_component }} |
{{ row.amount }} |