Hi everyone,
in this template we used a rollforward, to put some values back at 0 - because there the users have to put in new values for the current year.
With the code we use, after we did “copy details” we always get a line with 0 underneath the filled in template.
Can we avoid this extra line with 0 - and how?
´´´
-> Kredieten <-
{% stripnewlines %}
{% fori detail in custom.details %}
{% if forloop.first %}
| {% t “Doel lening” %}
| {% t “Bank” %}
| {% t “Contractnummer” %}
| {% t “Begindatum” %}
| {% t “Einddatum” %}
| {% t “Totaal kapitaalbedrag”%}
| {% t “Reeds afgelost”%}
| {% t “Aflossing huidig jaar”%}
| {% t “Resterend kapitaal”%}
| {% t “Intrest huidig jaar” %}
| {% t “Beroeps%” %}
| {% t “Beroepsmatige intrest” %}
{% ic %}| {% t “Privé intrest” %}{% endic %}
{% ic %}| {% t “Aflossingstabel” %}{% endic %}
{% newline %}
|:----------10%-----------:
|:---------10%------:
|:—10%—:
|:—10%—:
|:—10%—:
|—10%—:
|—10%—:
|—10%—:
|—10%—:
|—10%—:
|----10%----:
|–5%–:
|–10%–:
|----10%–:+#
{% endif %}
{% newline %}
| {% input detail.custom.doel lening %}
| {% input detail.custom.bank %}
| {% input detail.custom.contractnummer %}{% assign contractnummer = detail.custom.contractnummer %}{% result ‘contractnummer’ contractnummer %}
| {% input detail.custom.begindatum | date: “%d/%m/%Y”%}{% assign begindatum = detail.custom.begindatum | date: “%d/%m/%Y” %}
| {% input detail.custom.einddatum | date: “%d/%m/%Y” %}
| {% $3+input detail.custom.totaal_kapitaalbedrag as:currency%}
| {% $4+input detail.custom.reeds_afgelost as:currency%}
| {% $5+input detail.custom.aflossing_huidig_jaar as:currency %}
{% rollforward detail.custom.reeds_afgelost+detail.custom.aflossing_huidig_jaar detail.custom.reeds_afgelost %}
{% rollforward nil detail.custom.aflossing_huidig_jaar %}
| {%=$1+ detail.custom.totaal_kapitaalbedrag-detail.custom.reeds_afgelost-detail.custom.aflossing_huidig_jaar %}
| {% $7+input detail.custom.totale_intrest as:currency %}
{% rollforward nil detail.custom.totale_intrest %}
| {% input detail.custom.beroeps as:percentage %}
| {%=$0+ detail.custom.totale_intrest detail.custom.beroeps %}{% assign beroepsintresten = detail.custom.totale_intrest detail.custom.beroeps %}
| {%=$2+ detail.custom.totale_intrest-beroepsintresten %}
| {% input detail.custom.bijlage as:file %}
{% if forloop.last %}
{% newline %}
|
|
|
|
|
| {{ $3 | abs | currency }}
| {{ $4 | abs | currency }}
| {{ $5 | abs | currency }}
| {{ $1 | abs | currency }}
| {{ $7 | abs | currency }}
|
**| {{ $0 | abs | currency }} {% if ABS(#650000-$0) < 0.01 %}{% unreconciled 0 as:indicator %}{% else %}{% unreconciled #650000-$0 as:indicator %}{% endif %}
| {{ $2 | abs | currency }}
|
{% endif %}
{% if detail.custom.begindatum >= period.year_start_date and detail.custom.begindatum <= period.year_end_date %}
{% $6+ detail.custom.totaal_kapitaalbedrag %}
{% endif %}
{% endfori %}
{% endstripnewlines %}
{% result ‘priveintresten’ $2 %}
{% result ‘totaalkapitaal’ $3 %}
{% result ‘afgelost’ $4 %}
{% result ‘huidige’ $5 %}
{% result ‘nieuwelening’ $6 %}
-> Banksaldo’s <-
{% stripnewlines %}
{% fori bank in custom.bank_saldo %}
{% if forloop.first %}
| {% t “Rekeningnummer” %}
| {% t “Bank” %}
| {% t "Saldo per " %}{{ period.minus_2y.year_end_date | date: “%d/%m/%Y”}}
| {% t "Saldo per " %}{{ period.minus_1y.year_end_date | date: “%d/%m/%Y”}}
| {% t "Saldo per " %}{{ period.year_end_date | date: “%d/%m/%Y”}}
{% newline %}
|:----------20%-----------:
|:---------20%------:
|:—20%—:
|:—20%—:
|:—20%—:#
{% endif %}
{% newline %}
| {% input bank.rekeningnummer %}
| {% input bank.kredietinstelling %}
| {% input bank.saldoy2 placeholder:“Saldo Y-2” as:currency %}{% assign saldoy2 = bank.saldoy2 %}
| {% $8+input bank.saldoy1 placeholder:“Saldo Y-1” as:currency %}{% result ‘beginsaldo’ $8 %}
| {% $9+input bank.saldoy placeholder:“Saldo Y” as:currency %}{% result ‘eindsaldo’ $9 %}
{% rollforward bank.saldoy1 bank.saldoy2 %}
{% rollforward bank.saldoy bank.saldoy1 %}
{% rollforward nil bank.saldoy %}
{% if forloop.last %}
{% newline %}
|
|
|
| {{ $8 }}
|{{ $9 }}
{% endif %}
{% endfori %}
{% endstripnewlines %}´´´