Costs non commercial

Little reminder… We really need the template…

Hello @Fiduciaire.Eulaers,

Unfortunately, there is no way to display a calculated value (like a $1 for instance) in another template.
The only way you could to do it though :

  • do the calculation in a reconciliation template instead of a text template
  • or do the calculation and the text into 1 text template.

My honest opinion though, is to do the calculation in a reconciliation template; because all the variables there, are already attached to the period. Therefor, you can use any value somewhere else.

How? By working with ‘result’.

Let me give you an example :

you have a certain value $1 in the template “omzetvergelijking” (the ‘handle’ of this template, is called ‘omzetvgl’ for instance (you can give a handle if you create a new reconciliation template on office level).

So in omzetvergelijking you’ll find :

R03 : {{ $0 | currency }}

Change it to :

R03 : {{ $0 | currency }} {% result 'R03' $0 %}

Now, by doing that, you can use that value in another template, by using this :

{{ period.reconciliations.omzetvgl.results.R03 }}

period = just to be sure that’s it’s attached to a period
reconciliations = sort of template it’s used
omzetvgl = the name of the handle of the template
results = just to define that you’re using results-tag
R03 = the name you gave it

Hope that’s clear to you?

If not, just let us know!

Good luck with it

Thank you for your answer.
The only thing is, that I still don’t know the difference between a reconciliation template & a text template…
Can you help me with that?

Of course :+1:

Reconciliation template is a “toelichtingssjabloon” ; a template where you’ll calculate or do stuff with a range of accounts. It is seen in the working period, where you’ll find also the details through account templates.

Text template is found under documents, and you can create variables in there like custom.some.thing or company.custom.some.thing or period.custom.some.thing.

Hope this helps you @Fiduciaire.Eulaers

I still don’t know how to make/switch the text templates to a reconciliation template.
Is it possible you turn our “9.2 - Niet bedrijfsmatig” into a reconciliation template?

Hello @Fiduciaire.Eulaers,

Can you post your code of that text template? I can have a look into it, because some things need to be adjusted for that.

I’ll give you proper guidelines, don’t worry :relaxed:

{% capture table 'the_form' %}
{% if custom.detail.accounts == blank %}{% assign account_range = '61' %}{% else %}{% assign account_range = custom.detail.accounts %}{% endif %}

| **DETAIL KOSTEN WEERHOUDEN NIET-BEDRIJFSMATIG** {% input custom.detail.accounts as:account_collection range:6,7 default:account_range %} | Totaal rekening | % niet bedrijfsmatig | Te verwerpen {% assign accounts = period.accounts | range:account_range %}
|-----------40%---------------|---------------15%-----------:|---------------25%-----------:|---------------15%-----------:+{% for account in accounts %}
|{% if forloop.last %}_{% endif %}{{ account.name }}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{%=$0+ account.value %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% input custom[account.number].nietbedrijfsmatig as:percentage %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% if custom[account.number].nietbedrijfsmatig == blank %}{% assign nietbedrijfsmatig = 0 %}{% else %}{% assign nietbedrijfsmatig = custom[account.number].nietbedrijfsmatig %}{% endif %}{%=$1+ 1*nietbedrijfsmatig*account.value %}{% if forloop.last %}_{% endif %}{% endfor %}

|-----------40%---------------|---------------15%-----------:|---------------25%-----------:|---------------15%-----------:+{%fori explanation in custom.verklaringen %}
|{% input explanation.description %}|{% $2+input explanation.value as:currency %}|{% if forloop.last %}_{% endif %}{% input explanation.nietbedrijfsmatig as:percentage %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% if explanation.nietbedrijfsmatig == blank %}{% assign nietbedrijfsmatig = 0 %}{% else %}{% assign nietbedrijfsmatig = explanation.nietbedrijfsmatig %}{% endif %}{%=$1+ 1*explanation.value*explanation.nietbedrijfsmatig %}{% if forloop.last %}_{% endif %}{%endfori %}


|-----------40%----------|------------15%------:|-----------25%-------:|-----------15%-------:+
|                   |  **{{ $0 | currency }}** | {{ $1-$0 | currency }} | **{{ $1 | currency }}**
{% endcapture %}
{% result 'the_form' the_form %}
{% if custom.detail.goederen == blank %}{% assign goederen_range = '60'%}{% else %}{% assign goederen_range = custom.detail.goederen %}{% endif %}
{% assign goederen = period.accounts | range:goederen_range %}
{% assign period.custom.some.thing = $1 %}

===p


{{ table }}

Thanks @Fiduciaire.Eulaers,

And on first sight, nothing needs to be changed in that template.

So, on office level, you can add a blanc template, and paste your code in there. Give it a name you want, and also, a virtual number (starting with 6, means it will be displayed under “costs” f.i. or if it starts with 8, it will be displayed under ‘reconciliations’.)

Can you try this? See if it works?

Then I’ll show you how to display the result of “te verwerpen” in another template

Where do I need to put the number? Before the name?

And is it correct I put it under “Rekeningsjablonen”?

That’s not a reconciliation template, but an account template.

Just add a blanc one with the + symbol next to “Toelichtingen”, and you’ll see a virtual account number (but that’ stuff that can be done by chat, if you’re stuck).

When you’ve created the template, let me know by the community and I’ll explain how to display a calculated variable in another template.

It’s standing under 'Toelichtingen" now :slight_smile:

Okay, and now you probably want {{ $1 | currency }} to be displayed somewhere else, right?

In order to do so, follow this:

  1. give your template a ‘handle’. This is done at office level as well, where you also have the virtual account number. I’ll explain later why we do this (let’s say we give ‘niet_bedrijfsmatige_kosten’ as a handle name).

  2. next to {{ $1 | currency }} you put a new tag, like this :
    {% result 'te_verwerpen' $1 %}

This will result that you can display the value of *1 anywhere.

  1. in another template, you can display now the value of $1 of your reconciliation template, like this now :

Period = just to say it's period attached
Reconciliations = to know to look at reconciliations 
niet_bedrijfsmatige_kosten = your handle of your reconciliation template 
results = to look for a result-tag 
te_verwerpen = name of that tag 


Hope this helps you @Fiduciaire.Eulaers ?

It works!! Thank you SOOOOO much!!
I think I can make the other ones work too, now I know how :smile: