Unexplained tag

Hi there,

I inserted the unexplained tag in the code of our new template but it doesn’t count immediately.
Only when I switch between ‘Neen’ and ‘Ja’ the value is deducted from the amount to be explained.

Normally it should be deducted immediately when the value is filled in I suppose?
Am I doing something wrong?

See the code below:

{% ic %}
|------10%-------|------10%-----|-----+
|||
|Aankoop in vreemde munt?|{% input custom.vreemde.munt as:select options:"Ja|Neen" %}{% endic %}||
{% if custom.vreemde.munt == "Ja" %}

{% ic %}
|------10%-------|------10%-----|-----+
|In welke vreemde munt?|{% input custom.type.vreemde.munt %}| |
{% assign vreemde_munt = custom.type.vreemde.munt %}{% endic %}

{% if custom.type.vreemde.munt != blank %}

| Uittreksel | Datum | Omschrijving | Aantal | Koerswaarde in {{ vreemde_munt }} | Waarde | {{ vreemde_munt }}/EUR | Waarde
|----5%------|--7%---|-----20%------|--10%--:|-----------------10%--------------:|--10%--:|----------10%----------:|------:+{% fori aandelenvv in company.custom.aandelenvv %}
| {% input aandelenvv.uittreksel %}| {% input aandelenvv.datum as:date '%d/%m/%y' %}| {% input aandelenvv.omschrijving %}| {% input aandelenvv.aantal as:currency %}| {% input aandelenvv.koers_vreemde_munt as:currency %}| {% input aandelenvv.waarde as:percentage %}| {% input aandelenvv.koerswaarde_vreemde_munt_in_EUR as:currency %}| {% $2+input aandelenvv.totaal %} {% endfori %}
|{% if $2 <> 0 %}
|  |  |  |  |  |  |  | **{{ $2 | currency }}**
{% endif %}
{% endif %}

{% elsif custom.vreemde.munt == "Neen" %}

| Uittreksel | Datum | Omschrijving | Aantal | Koerswaarde in EUR | Waarde | EUR/EUR | Waarde
|----5%------|--7%---|-----20%------|--10%--:|-----------------10%--------------:|--10%--:|----------10%----------:|------:+{% fori aandelen in company.custom.aandelen %}
| {% input aandelen.uittreksel %}| {% input aandelen.datum as:date '%d/%m/%y' %}| {% input aandelen.omschrijving %}| {% input aandelen.aantal as:currency %}| {% input aandelen.koers_vreemde_munt as:currency %}| {% input aandelen.waarde as:percentage %}| {% input aandelen.koerswaarde_vreemde_munt_in_EUR as:currency %}| {% $1+input aandelen.totaal %} {% endfori %}
|{% if $1 <> 0 %}
|  |  |  |  |  |  |  | **{{ $1 | currency }}**
{% endif %}
{% endif %}

{% unexplained $1+$2-current_account.value %}

Kind regards,
Cedric

Hi @cedric.devos,

What is the reason you link your details to the company-drop? Every details in the working papers are period dependant no?

Either way, details from an account cannot be linked to to the company-drop. That’s the issue causing this. So company.custom.aandelenvv needs to change in custom.aandelenvv

Also, be sure to use the unreconciled tag (instead of the unexplained tag, since we don’t use it anymore)

Hope this works out for you?

Hi Sven,

Thanks for the help! No idea why I added the company-drop :slight_smile:

I just made another adjustment to the code. Instead of using an input field for calculating the ‘Waarde’ it is actually like this: aandelen.aantal * aandelen.koers * aandelen.waarde. But how do I get this value in a register ($1)?

I tried a few things but with no success.

| {% input aandelen.uittreksel %}| {% input aandelen.datum as:date '%d/%m/%y' %}| {% input aandelen.omschrijving %}| {% input aandelen.aantal as:currency %}| {% input aandelen.koers as:currency %}| {% input aandelen.waarde as:percentage %}|{{ 1 | currency }}| {{ aandelen.aantal*aandelen.koers*aandelen.waarde|currency }} {% endfori %}
|{% if $1 <> 0 %}
|  |  |  |  |  |  |  | **{{ $1 | currency }}**
````

Sure thing, just use this as code e.g. :

{% =$2+ aandelenvv.aantal*aandelenvv.koerswaarde_vreemde_munt_in_EUR | currency %} 

So the =$2+ and then the formula. More info on that here

1 Like