Percentages of the private portion are no longer visible in the previous years

For the integration with the Silverfin Assistant, we have adapted our template “EMZ - General Expenses”. This template should be active from 31.12.2023 The previous years of the files are locked and should therefore still use the previous template.

We notice that the percentages for the private portion are visible in 2022 but not in the previous years.

Below is the code of our old template.

{% include 'parts/translations' %}

{% assign end_bj = period.year_end_date | date:'%Y%m%d' %}

{% assign baten = false %}
{% if company.custom.berekening.type == 'batenberekening' %}{% assign baten = true %}{%endif%}

{% assign kbl = "Kosten Bedrijfslokalen" %}
{% assign bw = "Bedrijfswagens" %}
{% assign pw = "Personenwagens" %}
{% assign kk = "Kantoorkosten" %}
{% assign bk = "Beheerskosten" %}
{% assign vzk = "Verzekeringen" %}
{% assign dbk = "Diverse Bedrijfskosten" %}
{% assign aak = "Andere Algemene Kosten" %}
{% assign keys = 'kbl|bw|pw|kk|bk|vzk|dbk|aak' | split:'|' %}

{% assign not_present = "werd in geen enkele rubriek opgenomen!" %}
{% assign already_present = "Reeds opgenomen in een andere rubriek!" %}

{% assign date_format = '%d.%m.%Y' %}
{% assign time_format = '%k uur %M' %}
{% assign today = "now" | date:date_format %}
{% assign afgewerkt_datum = custom.volledig_afgewerkt[period.end_date].updated_at | date:date_format %}
{% if today == afgewerkt_datum %}{% assign dag = 'vandaag' %}{% else %}{% assign dag = 'op %d.%m.%Y' %}{% endif %}
{% assign afgewerkt_format = dag | append:' om ' | append:time_format %}

{% assign default_kbl = "610.0,610000,610100,61100,61200,61210,61211,612120,612200,640100" %}
{% assign default_bw = "611100,611120,611130,611151,612140,614200,640000" %}
{% if end_bj >= '20181231'%}
  {% assign default_pw = "61111,61112,61113,61115,61213,61421,64001" %}
{% else %}
  {% assign default_pw = "611110,611121,611131,611150,612130,614210,640010" %}
{% endif %}
{% assign default_kk = "612400,612500,612600,613200,613300,613600,613700,613710,613720,613730,613740,613800,613500" %}
{% assign default_bk = "613000,613100,613110,613120,613130,613140,613804,613810,613900" %}
{% if baten or end_bj >= '20181231' %}
  {% assign default_vzk = "61400,614100,614500,614600,614800,618501" %}
{% else %}
  {% assign default_vzk = "61400,614100,614500,614600,614800,618501,618101,618401" %}
{% endif %}
{% assign default_dbk = "64.0,640300,640400,640800,643000,640020,640500,640510,641000" %}
{% assign default_aak = "611400,612300,615,616,613820" %}

{% assign opgenomen = "" %}
{% assign alle = "61,64" %}
{% if baten or end_bj >= '20181231' %}
  {% assign uitzonderingen = "618402,618102,61315,61316,61317,6170,618101,618401" %}
{% else %}  
  {% assign uitzonderingen = "618402,618102,61315,61316,61317,6170" %}
{% endif %}
{% if custom.accounts.uitzonderingen != blank %}{% assign uitzonderingen = custom.accounts.uitzonderingen %}{% endif %}
{% assign accounts_uitzonderingen = period.accounts.include_zeros | range:uitzonderingen %}
{% assign uitzonderingen_nummers = accounts_uitzonderingen | map:"mapped_number" %}

{% assign alle_accounts = period.accounts.include_zeros | range:alle %}

{% assign $10 = 0 %}
{% assign $11 = 0 %}
{% assign $12 = 0 %}

{% nic %}
{% assign font_white = '<font color="FFFFFF">' %}
{% assign font_end = '</font>' %}
{% assign bg_color = '60635f' %}
{% endnic %}


{% nic %}
# {% t 'Detail van de Algemene Kosten' %}{% endnic %}

|        | {% t 'Totaal' %} | {% t 'Privé-gedeelte' %} | {% t 'Bedrijf' %} |
|--40%---|:---15%--:|:---30%----------:|:--15%---:#+

{% stripnewlines %}
{% for key in keys %}
{% assign $0 = 0.0 %}{% comment %} subtotal totaal  {% endcomment %}
{% assign $1 = 0.0 %}{% comment %} subtotal privé   {% endcomment %}
{% assign $2 = 0.0 %}{% comment %} subtotal bedrijf {% endcomment %}
{% assign accounts_default = 'default_' | append:key %}
{% assign key_totaal = key | append:'_totaal' %}
{% assign key_bedrijf = key | append:'_bedrijf' %}
{% if custom.accounts.[key] == blank %}{% assign accounts_var = [accounts_default] %}{%else%}{%assign accounts_var = custom.accounts.[key] %}{%endif%}
{% result key accounts_var %}
{% assign accounts = period.accounts.include_zeros | range:accounts_var %}
{% assign nonzero_accounts = period.accounts | range:accounts_var %}
{% assign opgenomen_account_nummers = period.accounts.include_zeros | range:opgenomen | map:'mapped_number' %}
{% newline %}
{% newline %}
{% ifi nonzero_accounts.count > 0 %}
{% nic %}{% if custom.newpages[key] == true %}
{% newpage%}
{% newline %}
{%endif%}{%endnic%}
{% assign key_value = [key] %}
{% capture key_trans %}{% t key_value %}{%endcapture%}
&nbsp;**{{ key_trans | upcase }}** {% input custom.accounts.[key] as:account_collection default:[accounts_default] range:1__9 %}
{% newline %}
  {% ic %}{% input custom.newpages[key] as:boolean %}*Begin deze rubriek op een nieuwe pagina*{%endic%}
  {% newline %}
  {% newline %}
  |--40%---|---15%--:|---15%----:|---15%---:|--15%----:+ 
  {% newline %}
{% endifi %}  
{% for account in accounts %}
{% assign $8 = 0 %}
{% ifi account.value != 0 %}
| {% ic %}{{ account.link }}{% endic %}
  {% if opgenomen_account_nummers contains account.mapped_number %}
    {% unexplained account.value %}
    {%ic%}{::warningtext}*{{already_present}}*{:/warningtext}{%endic%}
  {% endif %}
  {% nic %}{{ account.name }}{% endnic %}
| {%=$0+ account.value %} 
| {% capture account_id %}{{ account.id }}{% endcapture %}{%=$8+input custom.deel_prive[account_id] default:0 as:percentage %} 
| {%=$1+ $8*account.value | currency %}
| {%=$2+ (account.value-$8*account.value) | currency %} |
{% newline %}
{% endifi %}
{% endfor %}
{% assign opgenomen = opgenomen | append:"," | append:accounts_var %}
{% ifi nonzero_accounts.count > 0 %}
|-----------|
{% newline %}
|  
| **{%=$10+ $0 | currency %}** {% result key_totaal $0 %}
|
| **{%=$11+ $1 | currency %}**
| **{%=$12+ $2 | currency %}**{% result key_bedrijf $2 %}
{% newline %}
|-----------|
{% newline %}
| |
{% newline %}
{% newline %}
{% endifi %}
{% endfor %}

{% newline %}


{% newline %}
{% capture totaal_trans %}{% t 'Totaal algemene kosten' %}{% endcapture %}
| {{font_white}}{{ totaal_trans | upcase }}{{font_end}}
| {{font_white}}{{ $10 | currency }}{{font_end}}
| {{font_white}}{{ $11 | currency }}{{font_end}}
| {{font_white}}{{ $12 | currency }}{{font_end}}
|
{% newline %}
|:--40%---|---15%--:|---30%----------:|--15%---:+{{bg_color}}
{% newline %}
{%ic%}
| {% input custom.volledig_afgewerkt[period.end_date] as:boolean %}*Volledig afgewerkt* 
  {% if custom.volledig_afgewerkt[period.end_date] == 'true' %}
    *{{ custom.volledig_afgewerkt[period.end_date].updated_at | date:afgewerkt_format }}*
    *door* *{{ custom.volledig_afgewerkt[period.end_date].updated_by.name | strip }}*
| {% unexplained $12-custom.totaal_bedrijf[period.end_date] as:indicator %} | *voor een totaal bedrijfs-deel van* | {{ custom.totaal_bedrijf[period.end_date] | currency }} |
  {% else %}
| {% unexplained $12 as:indicator %} |  *voor een totaal bedrijfs-deel van* | {% input custom.totaal_bedrijf[period.end_date] as:currency placeholder:'verklaard bedrag' %} |
{% endif %}
{% newline %}
{% endic %}
{% endstripnewlines %}

{% assign accounts_opgenomen = period.accounts.include_zeros | range:opgenomen | map:'mapped_number' %}
{% assign accounts_included = accounts_opgenomen | concat:uitzonderingen_nummers %}

{% for account in alle_accounts %}{% unless accounts_included contains account.mapped_number %}{% unexplained account.number %}{%ic%}
{::warningtext}*{{account.link}}* *{{not_present}}*{:/warningtext}{%endic%}{% endunless %}{% endfor %}

{% ic %}
***{{ 'Niet op te nemen rekeningen' | upcase }}*** {% input custom.accounts.uitzonderingen as:account_collection default:uitzonderingen range:alle %}
{% for account in accounts_uitzonderingen %}
*{{ account.link }}*{% endfor %}
{% endic %}

{% result 'totaal_totaal' $10 %}
{% result 'totaal_bedrijf' $12 %}

Here below screenshot of the correct view for 31/12/2022

Here below screenshot of the wrong view for 31/12/2021

Hi @Maarten

the values you’re referring to are input values. Liquid cannot manipulate details.
These percentages will be different every year unless you use the rollforward functionality to transfer them.
The default on these inputs is specified in your code as “0”.

{%=$8+input custom.deel_prive[account_id] default:0 as:percentage %}

Are you saying the percentages that were previously filled out in 2022 are no longer there? Did you change the naming on these inputs?

The inputs for the percentages are connected to the accounts via the account.id, so as long as the same account is selected, and you use the rollforward (copy data functionality), the percentages will transfer correctly.

Kind regards,
Romy

Hi Romy, Thank you for your quick response.

The percentages were entered in 2020, 2021, and 2022. Silverfin has locked the periods due to the Silverfin Assistant integration, and now those percentages are no longer visible in 2020 and in 2021. Oddly enough, they are still visible in 2022.

Hi @Maarten

They locked the periods because that also locks the mapping. I’m guessing you’re starting to use a different mappinglist for the Assistant?

Once you unlock those periods, the account mapping will automatically update to the current one.
That means you could be seeing different accounts than before (not necessarily though, that depends), which explains why the old inputs with the percentages are not visible.

I would suggest you change back to your old mapping in the files where you’ve lost the percentages.
You should see them again.
Then lock the periods that should stay on the old mapping, and in the current period change it back to the new mapping list.

Kind regards,
Romy