My collegues asked for the possibility to add multiple miscellaneous benefits. I adapted the code from the original Silverfin-template. The titles are left open.
In most cases this works fine (or good enough ) . Only in one case the line {% input custom.vaa.vaa1 %} | | {% input custom.vaa.vaa2 %} | | {% input custom.vaa.vaa3 %} is visible in the preview but not in the export.
Has someone maybe some ideas to optimise this code?
Thanks!
{% stripnewlines %}
| {% ifi show_bez_bl or show_extra_bez_bl %}| | Vergoeding{% endifi %}{% ifi show_vaa_bl or show_extra_vaa_bl %}| | | | Voordelen alle aard | {% endifi %}
{% newline %}
|:------------------------------------|----10%---|-------|----10%---|-----------|-----------|-----------
{% newline %}
{% ifi show_vaa_bl or show_extra_vaa_bl %}| | | | | {% input custom.vaa.vaa1 %} | | {% input custom.vaa.vaa2 %} | | {% input custom.vaa.vaa3 %}
{% newline %}{% endifi %}
|:------------------------------------|----10%---|-------:|----10%---|-----------|----10%---|-----------|----10%---|-----------:
{% for zaakvoerder in period.directors %}
{% assign words = zaakvoerder.name | split: ' ' %}
{% assign lastname = "" %}
{% assign person_first_name = "" %}
{% for word in words %}
{% if forloop.last %}
{% assign person_first_name = word %}
{% else %}
{% assign lastname = lastname | append:" " | append:word %}
{% endif %}
{% endfor %}
{% assign bez_waarde = period.accounts | range:zaakvoerder.custom.bezoldiging_range %}
{% assign vaa_waarde = period.accounts | range:zaakvoerder.custom.vaa_range %}
{% ifi zaakvoerder.custom.bezoldiging != blank or zaakvoerder.custom.bezoldiging != 0.0 or bez_waarde.value != 0 or zaakvoerder.custom.vaa != blank or zaakvoerder.custom.vaa != 0.0 or vaa_waarde.value != 0.0 %}
{% newline %}
| {% if zaakvoerder.custom.first_name == blank and zaakvoerder.custom.last_name == blank %}{{ zaakvoerder.name }}{% elsif zaakvoerder.custom.first_name == blank and zaakvoerder.custom.last_name != blank %}{{ zaakvoerder.custom.last_name }} {{ person_first_name }}{% elsif zaakvoerder.custom.first_name != blank and zaakvoerder.custom.last_name == blank %}{{ lastname }} {{ zaakvoerder.custom.first_name }}{% else %}{{ zaakvoerder.custom.last_name }} {{ zaakvoerder.custom.first_name }}{% endif %}
{% ifi show_bez_bl or show_extra_bez_bl %}
| {% input zaakvoerder.custom.bezoldiging_range as:account_collection range:618,62,74 accounts_var:bez %}
{% assign abs_bez = bez.6-bez.7 %}
| {% input zaakvoerder.custom.bezoldiging default:abs_bez as:currency %}
{% endifi %}
{% ifi show_vaa_bl or show_extra_vaa_bl %}
| {% input zaakvoerder.custom.vaa1_range as:account_collection range:74,618 accounts_var:vaa1 %}
{% assign abs_vaa1 = vaa1.6-vaa1.7 %}
|{% input zaakvoerder.custom.vaa1 default:abs_vaa1 as:currency %}
| {% input zaakvoerder.custom.vaa2_range as:account_collection range:74,618 accounts_var:vaa2 %}
{% assign abs_vaa2 = vaa2.6-vaa2.7 %}
|{% input zaakvoerder.custom.vaa2 default:abs_vaa2 as:currency %}
| {% input zaakvoerder.custom.vaa3_range as:account_collection range:74,618 accounts_var:vaa3 %}
{% assign abs_vaa3 = vaa3.6-vaa3.7 %}
|{% input zaakvoerder.custom.vaa3 default:abs_vaa3 as:currency %}
{% endifi %}
{% endifi %}
{% endfor %}
{% fori bezoldiging in period.custom.extra_bezoldiging %}
{% ifi show_extra_bez_bl or show_extra_vaa_bl %}
{% newline %}
| {% input bezoldiging.name %}
{% ifi show_bez_bl or show_extra_bez_bl %}
| {% input bezoldiging.bezoldinging_range as:account_collection range:618,62,74 accounts_var:bez_bez %}
{% assign abs_bez_bez = bez_bez.6-bez_bez.7 %}
| {% input bezoldiging.bedrag default:abs_bez_bez as:currency %}
{% endifi %}
{% ifi show_vaa_bl or show_extra_vaa_bl %}
| {% input bezoldiging.accounts1 as:account_collection range:74,618 accounts_var:extra_vaa1 %}
{% assign abs_extra_vaa1 = extra_vaa1.6-extra_vaa1.7 %}
|{% input bezoldiging.vaa1_extra default:abs_extra_vaa1 as:currency %}
| {% input bezoldiging.accounts2 as:account_collection range:74,618 accounts_var:extra_vaa2 %}
{% assign abs_extra_vaa2 = extra_vaa2.6-extra_vaa2.7 %}
|{% input bezoldiging.vaa2_extra default:abs_extra_vaa2 as:currency %}
| {% input bezoldiging.accounts3 as:account_collection range:74,618 accounts_var:extra_vaa3 %}
{% assign abs_extra_vaa3 = extra_vaa3.6-extra_vaa3.7 %}
|{% input bezoldiging.vaa3_extra default:abs_extra_vaa3 as:currency %}
{% endifi %}
{% endifi %}
{% endfori %}
{% endstripnewlines %}
{% endifi %}
{:/group}