Export is empty

I have made a variaton on the “toelichting beroepskosten”, everything works on the screen, but when i export this, it’s emty… Where did it go wrong in my code?

{% t= “Detail van de kosten” fr:“Détails des frais” %}

{% t= “Fiscale beperking” fr:“Limite fiscale” %}
{% t= “Aftrekbaar” fr:“Déductible” %}
{% t= “Ontvangsten/Baten” fr:“Chiffre d’affaires” %}
{% t= “Beginvoorraad” fr:“Stock initial” %}
{% t= “Eindvoorraad” fr:“Stock final” %}
{% t= “Verkochte voorraad” fr:“Stock vendu” %}
{% t= “Brutowinst” fr:“Résultat brute” %}
{% t= “Sociale bijdragen” fr:“Cotisations sociales” %}
{% t= “Toekenning meewerkende echtgeno(o)t(e)” fr:“Octroi époux/-ouse cooperative” %}
{% t= “Kosten” fr:“Frais” %}
{% t= “Nettoresultaat” fr:“Résultat net” %}
{% t= “niet toegewezen bedrag” fr:“comptant non affectués” %}

{% t= “Kosten mbt bedrijfslokalen” fr:“La location et les frais de location” en:“Rent and rental expenses” %}
{% t= “Kosten mbt voertuigen” fr:“L’entretien et les réparation” en:“Maintenance and repair” %}
{% t= “Kantoorkosten” fr:“Les fournitures et les services” en:“Supplies and services” %}
{% t= “Vergoeding aan derden” fr:“Les frais de tiers” en:“Remuneration to third parties” %}
{% t= “Kantoorkosten”%}
{% t= “Administratiekosten”%}
{% t= “Kosten mbt verzekeringen”%}
{% t= “Specifieke kosten”%}
{% t= “Uitzendkrachten”%}
{% t= “Bezoldiging bedrijfsleider”%}
{% t= “Persoonlijke bijdragen”%}
{% t= “Afschrijvingen”%}
{% t= “Financiële kosten”%}
{% t= “Andere bedrijfsopbrengsten”%}
{% t= “Financiële opbrengsten”%}
{% t= “Totaal” fr:“Le Total” en:“Total” %}
{% t= “Andere bedrijfskosten” fr:“Les Divers” en:“Miscellaneous” %}
{% t= “Extra toelichting” fr:“Explication supplémentaire” en:“Additional explanation” %}
{% t= “Nr.” fr:“N°” en:“No.” %}
{% t= “Bedrag” fr:“Montant” en:“Amount” %}

{% if cost_categories_string == blank or cost_keys_string == blank %}
{% assign cost_categories_string = “Kosten mbt bedrijfslokalen|Kosten mbt voertuigen|Kantoorkosten|Administratiekosten|Kosten mbt verzekeringen|Vergoeding aan derden|Specifieke kosten|Uitzendkrachten|Bezoldiging bedrijfsleider|Persoonlijke bijdragen|Afschrijvingen|Andere bedrijfskosten|Financiële kosten|Andere bedrijfsopbrengsten|Financiële opbrengsten” %}
{% assign cost_keys_string = “lokalen|voertuigen|kantoor|admin|verzek|derden|specifiek|interim|leider|persoon|Afschrijving|andere|finkost|bedropbr|finopbr” %}
{% endif %}

{% assign cost_categories = cost_categories_string | split:"|" %}
{% assign cost_keys = cost_keys_string | split:"|" %}

{% capture table %}


|-----------40%---------------|---------------15%-----------:|---------------30%-----------:|---------------15%-----------:+
| {% t “Detail van de kosten” %} |{{ period.year_end_date | date:’%Y’ }}| {% t “Fiscale beperking” %} | {% t “Aftrekbaar” %}


{% for cost_category in cost_categories %}{% assign $11 = 0 %}{% assign $13 = 0 %}{% assign $14 = 0 %}{% assign category_key = cost_keys[forloop.index0] %}
| {{ cost_category }} {% input custom[category_key].accounts as:account_collection range:6,7 accounts_var:costs %} |
|-----------40%---------------|---------------15%-----------:|---------------30%-----------:|---------------15%-----------:+{% for account in costs %}
|{{ account.name }}|{%=$11+ -1account.value %}|{% input custom[account.number].beperking as:percentage %}{% if custom[account.number].beperking == blank %}{% assign beperking = 1 %}{% else %}{% assign beperking = 1-custom[account.number].beperking %}{% endif %}{% $13+ -1beperkingaccount.value %}|{%=$14+ -1beperking*account.value %}{% if forloop.last %}
| | {% =$21+ $11 | currency %} | {% =$23+ $11-$13 | currency %} | {% =$1+ $14 | currency %}{% result category_key $14 %}
|{% endif %}{% endfor %}{% endfor %}


|-----------40%--------------:|---------------15%-----------:|---------------30%-----------:|---------------15%-----------:+
| {% t “Totaal” %} | {{ $21 | currency }} | {{ $23 | currency }} | {{ $1 | currency }}


{% endcapture %}

{% if custom.detail.goederen == blank %}{% assign goederen_range = ‘60’%}{% else %}{% assign goederen_range = custom.detail.goederen %}{% endif %}
{% assign goederen = period.accounts | range:goederen_range %}

|---------------------|-------15%-------:|-------15%-------:|-------15%-------:+
| {% t “Ontvangsten/Baten” %} {% input custom.detail.omzet as:account_collection range:7 default:‘70’ accounts_var:omzet %}| | | {%=$10+ -1omzet.value | currency %}{% for account in omzet %}
|      {{ account.name }}|{{ -1
account.value | currency }}{% endfor %}{% ifi goederen.value != 0 %}
| {% t “Handelsgoederen, grond en hulpstoffen” %} {% input custom.detail.goederen as:account_collection range:60’ %}| |{{ -1goederen.value | currency }}{%
for account in goederen %}
|      {{ account.name }}|{{ -1
account.value | currency }}{% endfor %}
| {% t “Beginvoorraad” %} {% input custom.detail.beginvoorraad as:account_collection range:6,7 accounts_var:beginvoorraad %} {% input custom.beginvoorraad.doc as:file %}| | {{ -1beginvoorraad.value | currency}}
| {% t “Eindvoorraad” %} {% input custom.detail.eindvoorraad as:account_collection range:6,7 accounts_var:eindvoorraad %} {% input custom.eindvoorraad.doc as:file %}| |_{{ -1
eindvoorraad.value | currency}}_
| {% t “Verkochte goederen” %}|||{%=$10+ -1*(beginvoorraad.value+goederen.value+eindvoorraad.value) | currency %}
| {% t “Brutowinst” %} ||| {{ $10 | currency }}{% endifi %}{% ifi custom.detail.sociale_bijdrage != blank %}
| {% t “Sociale bijdragen” %} {% input custom.detail.sociale_bijdrage as:account_collection range:6 accounts_var:sociale_bijdrage %} {% input custom.sociale_bijdrage.doc as:file %}| | | {%=$10+ -1sociale_bijdrage.value | currency %}{% endifi %}{% ifi custom.detail.echtgenote != blank %}{%
for account in sociale_bijdrage %}
|      {{ account.name }}|{{ account.value | currency }}{% endfor %}
| {% t “Toekenning meewerkende echtgeno(o)t(e)” %} {% input custom.echtgenoot.doc as:file %} | {% input custom.detail.echtgenote as:currency %} | | {%=$10+ -1
custom.detail.echtgenote | currency %} {% endifi %}{% assign bruto_winst = $10 %}
| {% t “Kosten” %} | | |{% =$10+ $1 %}
| {% t “Nettoresultaat” %} | | | {{ $10 | currency }}
|{% fori extra_account in custom.extra_accounts %}
|{% input extra_account.name %} {% input extra_account.accounts as:account_collection range:6,7 %}{% input extra_account.doc as:file %} | | |{% assign accounts = period.accounts | range:extra_account.accounts %}{%=$20+ -1*accounts.value | currency %}{% endfori %}
|
|
| {% t “Investeringsaftrek” %} | | | {% input custom.detail.investaftrek as:currency %}
|

{% newpage %}

{{ table }}

{% assign niet_toegewezen = #6-#619999+#7+(bruto_winst+$0+$21+$20) %}
{% unexplained niet_toegewezen %}

{% ic %}{% t “niet toegewezen bedrag” %} {{ niet_toegewezen | currency }}{% endic %}

Hi @Joyce,

Did you add a “virtual account number” for the template? We use these numbers to determine the order in which the templates are exported.

If this is not the case, the template will not be exported.

KInd regards,

Mathias

oh! no, i didn’t know that.
thank you, this problem is solved :smiley:

i have another question for this template.
is there a possibility that i can link the accountnumbers to the groups i made?
for example: “Kosten mbt bedrijfslokalen” is alwas beginning with “610”.

Hello @Joyce,

What you’re looking for, has already been explained in a topic right here.

Hope this works for you; if not, let us know!

when i click this link, i’m being redirected to “slack” but i don’t know how to login to this?

Hi @Joyce,

my bad! I fixed the link right now.

Sven

oké thanks.
I have another question for this template. Sometimes we have exceptions for which we want to create another blank line in the template. But it has to act like an accountnumber which is linked to the total.

{% if cost_categories_string == blank or cost_keys_string == blank %}
  {% assign cost_categories_string = "Kosten mbt bedrijfslokalen|Kosten mbt voertuigen|Kantoorkosten|Administratiekosten|Kosten mbt verzekeringen|Vergoeding aan derden|Specifieke kosten|Uitzendkrachten|Persoonlijke bijdragen|Personeelskosten|Afschrijvingen|Andere bedrijfskosten|Financiële kosten|Andere bedrijfsopbrengsten|Financiële opbrengsten" %}
  {% assign cost_keys_string = "lokalen|voertuigen|kantoor|admin|verzek|derden|specifiek|interim|leider|persoon|personeel|Afschrijving|andere|finkost|bedropbr|finopbr" %}
{% endif %}

{% assign cost_categories = cost_categories_string | split:"|" %}
{% assign cost_keys = cost_keys_string | split:"|" %}

{% capture table %}

-----------------------------------------------------------------------------------------------------------

|-----------40%---------------|---------------15%-----------:|---------------30%-----------:|---------------15%-----------:+
| **{% t "Detail van de kosten" %}**    |**{{ period.year_end_date | date:'%Y' }}**| **{% t "Fiscale beperking" %}**    | **{% t "Aftrekbaar" %}**                      

-----------------------------------------------------------------------------------------------------------

{% for cost_category in cost_categories %}{% assign $11 = 0 %}{% assign $13 = 0 %}{% assign $14 = 0 %}{% assign category_key = cost_keys[forloop.index0] %}
| **{{ cost_category }}** {% input custom[category_key].accounts as:account_collection range:6,7 accounts_var:costs %} |
|-----------40%---------------|---------------15%-----------:|---------------30%-----------:|---------------15%-----------:+{% for account in costs %}
|{{ account.name }}|{%=$11+ -1*account.value %}|{% input custom[account.number].beperking as:percentage %}{% if custom[account.number].beperking == blank %}{% assign beperking = 1 %}{% else %}{% assign beperking = 1-custom[account.number].beperking %}{% endif %}{% $13+ -1*beperking*account.value %}|{%=$14+ -1*beperking*account.value %}{% if forloop.last %}
|     | **{% =$21+ $11 | currency %}** | **{% =$23+ $11-$13 | currency %}** | **{% =$1+ $14 | currency %}**{% result category_key $14 %}
|{% endif %}{% endfor %}{% endfor %}

-----------------------------------------------------------------------------------------------------------

|-----------40%--------------:|---------------15%-----------:|---------------30%-----------:|---------------15%-----------:+
| **{% t "Totaal" %}**                  | **{{ $21 | currency }}**  | {{ $23 | currency }} | **{{ $1 | currency }}**


-----------------------------------------------------------------------------------------------------------

{% endcapture %}

So in this part, I want at the bottom of the table an extra line which i can count with.
How do i do that?

Can you paste your whole code @Joyce? Where would you want to create a fori-loop, if I understand it correctly?

If you want to count with an extra line, then you’ll need to create a custom object :

{% input custom.extra_amount.values as:currency %} 

The value you put in that object, can be saved in another register if you want :

{% =$33+ custom.extra_amount.values | currency %} 

and with that register you can calculate further. But hard to tell where exatly you want to calculate further… Hope this helps you a bit?

If not, let it known and we’ll help you forward. you could make a new topic out of this, hence this is not related to the original question in this topic :bulb:

Hi, I’ve a adapted the template for interest calculation, but this wont be exported to pdf. I do have a virtual number, but still, the page keeps blank at the export. What else can I do?