Using account_collection range:

Dear,

I’ve the following code:

{% assign accounts_a = period.accounts | range: custom.accounts.a %}
{% ifi accounts_a != empty or custom.a != empty %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+
{% stripnewlines %}
|   {% unless accounts_a != empty or custom.a != empty %}{% input custom.non_deductible.taxes as:boolean default:'true' %}{% endunless %} 
|**{% t "Non deductible taxes" %}**  {% input custom.accounts.a as:account_collection range:6,7 %}{% assign $1 = 0 %} 
|
|
|
|
|
{% endstripnewlines %}

{% if custom.non_deductible.taxes != 'false' %}

|:-4%--|:-40%-------|--14%---:|:-12%---:|--13%--:|--13%---:|-4%--:+{%for account in accounts_a %}
{% stripnewlines %}
|
|{% ic %}  {% endic %}{{ account.number }} {{ account.name }}
|{%=$1+ account.value %}
|
|
|
|
{% endstripnewlines %}{% endfor %

Now I would like to code that the range is not allowed to be 6,7 if the accounts are not in BE GAAP.
Therefore I would like to code sth like:
{% if company.custom.specific.resident == “Resident” %}
{% assign range = 6,7 %}
{% elseif company.custom.specific.resdient== ‘"Non-resident’%}
NO RANGE
{% endif %}

How can I do this properly?

Thanks in advance,

Kind regards,

Glenn

Has anyone an idea? Because I’m kind of stuck.