Hi @Stefanie, and welcome to the Silverfin Community!
The problem here seems to be the next if statement:
{% if accounts_rekening_courant == #489 %}
Here, we are comparing the total value of the accounts assigned to ‘accounts_rekening_courant’ with the total value of the accounts that starts with 489. So, as you noticed, it will only be true if all the 489 accounts are selected.
What we can do instead is loop over each of the numbers of the accounts selected. And if one of those contains 489, create a variable (setting it to true) which we are going to use for showing the text.
The code could look like this:
{% for account in accounts_rekening_courant %}
{% if account.number contains 489 %}
{% assign show_message = true %}
{% endif %}
{% endfor %}
{% stripnewlines %}
{% if show_message %}
De intresten rekening courant worden betaalbaar gesteld per {% input period.custom.rekening_courant.date as:date placeholder: “dd/mm/yyyy” %}.
{% endif %}
{% endstripnewlines %}
Also, it could be created a similar for loop, assigning the same ‘show_message’ variable to false if an 416 account is selected.