Opening_value not found if actual value is 0

I have the following situation

year 2015
account 1 = 100 €
account 2 = 100 €
account 3 not exists

Year 2016
account 1 = 100 €
account 2 = 0 €
account 3 = 100 €

Account 2 is not used any more, and is replaced with account 3 (reason new import, with new accounting scheme)

{% input custom.invullen.accounts_reserves as:account_collection accounts_var:reserves_accounts range:1 %}
{% assign reserves = -1reserves_accounts.opening_value %}{{ reserves | currency }}
{% assign reserves = MAX(0;reserves) %}
{% for a in reserves_accounts %}
{{ a.number }} {{ a.name }}*{% unless forloop.last %}, {% endunless %}{% endfor %}

the sum of the opening_value’s for 2016 is 100 € while it should be 200 €
I think the reason is that the program is looking only in the current period 2016, while we expect it to look at 2015. Can we solve this, without a manual correction in period 2015

Hello @Katrien,

The value of an opening_value is calculated by looking at the end_value (so YearToDate) of that account in the last period of the previous book year.
So if that value, or better said, that account doesn’t exists in the last period of previous book year, then a value of 0,00 will be calculated.

This is what our online manual says about opening_value :

The value for this account in the last period of the previous book year. If the last period of the previous book year does not exist in Silverfin, this will be 0

see also https://github.com/GetSilverfin/sf-templates/blob/master/drops/account.md