Hi,
I’m trying to build a custom template for the calculation of intercompany intrests.
The problem I’m facing is the indicator of the account keeps unexplained. How can i solve this?
Here is my code:
|Kwartaal |Saldo begin kwartaal | Saldo einde kwartaal | Gemiddelde | D/C Intrest (%) | Intrest |
|--22%-----------------------|--20%----------------------:|----20%---------------------:|-------10%-------------:|---------------------:|---------:+
|Kwartaal {% input custom.kwartaal1.naam %}|{% input custom.kwartaal1.beginsaldo as:currency %}{% $1+ custom.kwartaal1.beginsaldo %}|{% input custom.kwartaal1.eindsaldo as:currency %}{% $1+ custom.kwartaal1.eindsaldo %}|{{ $1/2 | currency }}|{% input custom.kwartaal1.intrestperc as:percentage %}{% $0+ custom.kwartaal1.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal1.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
|Kwartaal {% input custom.kwartaal2.naam %}|{{ $1 | currency }}|{% input custom.kwartaal2.eindsaldo as:currency %}{% $1+ custom.kwartaal2.eindsaldo %} |{{ $1/2 | currency }}|{% input custom.kwartaal2.intrestperc as:percentage %}{% $0+ custom.kwartaal2.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal2.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
|Kwartaal {% input custom.kwartaal3.naam %}|{{ $1 | currency }}|{% input custom.kwartaal3.eindsaldo as:currency %}{% $1+ custom.kwartaal3.eindsaldo %} |{{ $1/2 | currency }}|{% input custom.kwartaal3.intrestperc as:percentage %}{% $0+ custom.kwartaal3.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal3.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
|Kwartaal {% input custom.kwartaal4.naam %}|{{ $1 | currency }}|{% input custom.kwartaal4.eindsaldo as:currency %}{% $1+ custom.kwartaal4.eindsaldo %} |{{ $1/2 | currency }}|{% input custom.kwartaal4.intrestperc as:percentage %}{% $0+ custom.kwartaal4.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal4.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
| | |**{{ $1 | currency }}** | | **Totaal intresten :** | **{{ $3 | currency }}**|
{% unexplained $3-current_account.value | as:indicator %}
*{{ current_account.link }} waarde rekening {{ current_account.value }} waarde var 3 {{ $3 | currency }} moet 0 zijn om goed te zijn ! {%=$2+$3-current_account.value %}*