Beroepskosten - afdrukken

Wij hebben een nieuw sjabloon aangemaakt voor Beroepskosten bij eenmanszaken.
Het sjabloon op zich, werkt en rekent perfect maar wanneer we dit willen afdrukken via exporteer, krijgen we een wit blad te zien.
Van het support-team, kregen we te horen dat dit te maken heeft met de liquid code.
Kan er ons hier iemand mee helpen wat dit juist is?

Hello @Delphine,

Welcome to our Community! Could you formulate everything in English please (as is asked here? :wink:

Also, we’ll need to look at your code, so if you can paste it here (how you can do that, is explained here)

PS if nothing is exported, it might be related to a missing virtual account number given to your custom recon template?
That too is explained here:

Hope we can help you :slightly_smiling_face:

@Delphine,

Because you had issues pasting your code, let me do it here, as well with part of the solution in it (seen as a comment-tag):

{% t= "Detail van de kosten" fr:"Les Détails des frais" en:"Detail of all costs" %}
{% t= "Fiscale beperking" fr:"La limite fiscale" en:"Fiscal limitation" %}
{% t= "Totale beperking" fr:"La limite totale" en:"Total limitation" %}
{% t= "Aftrekbare beroepskosten" fr:"Déductible" en:"Deductible" %}
{% t= "aftrekbaar" fr:"déductible" en:"deductible" %}
{% t= "Niet aftrekbaar" fr:"Non déductible" en:"Not deductible" %}
{% t= "Ontvangsten/Baten" fr:"Le chiffre d'affaires" en:"Revenues" %}

{% t= "Voorraadwijziging" fr:"Changement de stock" en:"Change in stocks" %}
{% t= "Toon beginvoorraad - eindvoorraad boekjaar" fr:"Afficher le stock initial - le stock final de l'exercice" en:"Show initial - final stock for the financial year"%}
{% t= "Beginvoorraad" fr:"Stock initial" en:"Initial stock" %}
{% t= "Eindvoorraad" fr:"Stock final" en:"Final stock" %}

{% t= "Verkochte voorraad" fr:"Le stock vendu" en:"Stock sold" %}
{% t= "Brutowinst" fr:"Le résultat brut" en:"Gross profit" %}
{% t= "Sociale bijdragen" fr:"Les cotisations sociales" en:"Social contributions" %}
{% t= "Toekenning meewerkende echtgeno(o)t(e)" fr:"L'Octroi époux/-ouse cooperative" en:"Allocation helping spouse" %}
{% t= "Kosten" fr:"Les frais" en:"costs" %}
{% t= "Nettoresultaat" fr:"Le résultat net" en:"Net result" %}
{% t= "Niet toegewezen bedrag" fr:"Le montant non affectués" en:"Unassigned amount" %}
{% t= "Alle rekeningen zijn opgenomen" fr:"Tous des comptes sont inclus" en:"All accounts are selected" %}
{% t= "Eén of meerdere rekeningen werden meermaals toegewezen" fr:"Un ou plusieurs comptes ont été attribués plusieurs fois" en:"One or more accounts were selected more than once" %}
{% t= "Niet alle rekeningen zijn opgenomen" fr:"Tous les comptes ne sont pas inclus" en:"Not all accounts are selected" %}
{% t= "Handelsgoederen, grond en hulpstoffen" fr:"Les marchandises, matières premières et matières consommables" en:"Goods for resale, raw materials and additives" %}
{% t= "Verkochte goederen" fr:"Les biens vendus" en:"Sold goods" %}
{% t= "Huur en huurlasten" fr:"La location et les frais de location" en:"Rent and rental expenses" %}
{% t= "Onderhoud en herstellingen" fr:"L'entretien et les réparation" en:"Maintenance and repair" %}
{% t= "Leveringen en diensten" 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= "Totaal" fr:"Le Total" en:"Total" %}
{% t= "Divers" 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 %}
  {% assign cost_categories_string = "Huur en huurlasten|Onderhoud en herstellingen|Leveringen en diensten|Vergoeding aan derden|Divers" %}
  {% assign cost_keys_string = "huur|onderhoud|leveringen|vergoeding|divers" %}
{% endif %}

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

{% if cost_keys_string != blank %}
  {% assign cost_keys = cost_keys_string | split:"|" %}
{% endif %}

{% assign toegewezen = "" %}
{% assign def_voorraadwijziging = "" %}
{% assign count = 0 %}

{% for cost_category in cost_categories %}
  {% if cost_keys_string != blank %}
    {% assign category_key = cost_keys[forloop.index0] %}
  {% else %}
    {% assign category_key = cost_category | replace:" ","_" | downcase %}
  {% endif %}
  
  {% assign costs_range = custom[category_key].selected | default:custom[category_key].accounts %}
  
  {% assign costs = period.accounts.include_zeros | range:costs_range %}
  {% for account in costs %}
    {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
  {% endfor %}
{% endfor %}

{% assign omzet_range = custom.detail.omzet | default:"70" %}
{% assign omzet = period.accounts.include_zeros| range:omzet_range %}
{% for account in omzet %}
  {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
{% endfor %}

{% assign goederen_range = custom.detail.goederen | default:"60" %}
{% assign goederen = period.accounts.include_zeros| range:goederen_range %}
{% for account in goederen %}
  {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
{% endfor %}

{% comment %} voorraadwijziging {% endcomment %}

{% assign beginvoorraad = period.accounts.include_zeros | range:custom.detail.beginvoorraad %} 
{% for account in beginvoorraad %}
  {% assign def_beginvoorraad = def_beginvoorraad | append:account.number %}
  {% unless forloop.last %}
    {% assign def_beginvoorraad = def_beginvoorraad | append:"," %}
  {% endunless %}
{% endfor %}

{% assign eindvoorraad = period.accounts.include_zeros| range:custom.detail.eindvoorraad %}
{% for account in eindvoorraad %}
  {% assign def_eindvoorraad = def_eindvoorraad  | append: account.number %}
  {% unless forloop.last %}
    {% assign def_eindvoorraad = def_eindvoorraad | append:"," %}
  {% endunless %}
{% endfor %}

{% assign def_voorraadwijziging = def_beginvoorraad  | append:"," | append:def_eindvoorraad %}

{% assign acccounts_begin = period.minus_1y.accounts | range:custom.begin_eind.range %}
{% assign beginvoorraad = custom.voorraad.begin | default:acccounts_begin.value %}

{% assign acccounts_eind = period.accounts | range:custom.begin_eind.range %}
{% assign eindvoorraad = custom.voorraad.eind | default:acccounts_eind.value %}

{% assign voorraadwijziging_range = custom.detail.voorraadwijziging | default:def_voorraadwijziging %}
{% assign voorraadwijziging = period.accounts.include_zeros | range:voorraadwijziging_range %}
{% capture voorraadwijziging_rows %}{% input custom.wijziging.voorraad as:currency default:-1*voorraadwijziging.value %} {% assign wijziging_in_voorraad = custom.wijziging.voorraad | default:-1*voorraadwijziging.value %}{% result 'voorraadwijziging' wijziging_in_voorraad %}
{% for account in voorraadwijziging %}
    {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
{% endfor %}
{% endcapture %}

{% assign sociale_bijdrage = period.accounts.include_zeros| range:custom.detail.sociale_bijdrage %}
{% for account in sociale_bijdrage %}
{% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
{% endfor %}

{% assign echtgenote = period.accounts.include_zeros| range:custom.detail.echtgenote %}
{% for account in echtgenote %}
  {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
{% endfor %}

{% for extra_kost in custom.extra_kosten %}
  {% assign accounts = period.accounts.include_zeros | range:extra_kost.accounts %}
  {% for account in accounts %}
  {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
  {% endfor %}
{% endfor %}

{% for extra_account in custom.extra_accounts %}
  {% assign accounts = period.accounts.include_zeros | range:extra_account.accounts %}
  {% for account in accounts %}
  {% assign toegewezen = toegewezen | append:"$" | append: account.number | append:"$;" %}
  {% endfor %}
{% endfor %}
  
{% assign global_6_range = "" %}
{% assign accounts = period.accounts.include_zeros | range:'6' %}

{% for account in accounts %}
{% assign numberwithdollar = account.number | prepend:"$" | append:"$" %} 
  {% unless toegewezen contains numberwithdollar %}
    {% unless global_6_range == blank %}{% assign global_6_range = global_6_range | append:"," %}{% endunless %}
    {% assign global_6_range = global_6_range | append:account.number %}
  {% endunless%}
{% endfor %}

{% assign global_7_range = "" %}
{% assign accounts = period.accounts.include_zeros | range:'7' %}

{% for account in accounts %}
{% assign numberwithdollar = account.number | prepend:"$" | append:"$" %}
  {% unless toegewezen contains numberwithdollar %}
    {% unless global_7_range == blank %}{% assign global_7_range = global_7_range | append:"," %}{% endunless %}
    {% assign global_7_range = global_7_range | append:account.number %}
  {% endunless%}
{% endfor %}

{% assign global_range = global_6_range | append:"," | append:global_7_range %}


{% capture header %}|-----------40%---------------|---------------10%-----------:|---------------20%-----------:|---------------30%-----------:+{% endcapture %}

{% capture table %}

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

{% stripnewlines %}
{{ header }}
{% newline %}
| **{% t "Detail van de kosten" %}**    
| **{{ period.year_end_date | date:'%Y' }}**
| **{% t "Fiscale beperking (aftrekbaar)" %}**
| **{% t "Aftrekbare beroepskosten" %}**                      
{% newline %}                
{% newline %}
-----------------------------------------------------------------------------------------------------------
{% newline %}                
{% newline %}
{% for cost_category in cost_categories %}
  {% assign $11 = 0 %}
  {% assign $12 = 0 %}
  {% assign $13 = 0 %}
    {% if cost_keys_string != blank %}
    {% assign category_key = cost_keys[forloop.index0] %}
  {% else %}
    {% assign category_key = cost_category | replace:" ","_" | downcase %}
  {% endif %}
  
  {% assign costs_range = custom[category_key].selected | default:custom[category_key].accounts %}

    {% ifi costs_range != blank %}
{% newline %}
  | **{% t cost_category %}** {% input custom[category_key].accounts as:account_collection range:global_range %} |

  
  
  {% ic %}{% assign costs = period.accounts.include_zeros | range:costs_range %}{% endic %}
  {% nic %}{% assign costs = period.accounts | range:costs_range %}{% endnic %}
  
  {% newline %}
  {{ header }}
  {% newline %}
  {% for account in costs %}
    {% assign vin_old = 1-custom[account.number].vin %}
    {% assign vin_new = custom[account.number].vin_new | default:vin_old %}
    {% if vin_new == blank %}
      {% assign vin = 0 %}
    {% else %}
      {% assign vin = vin_new %}
    {% endif %}
    
    
    | {{ account.name }}
    | {%=$11+ -1*account.value as:currency %}
    | {% input custom[account.number].vin_new as:percentage placeholder:'0.00%' default:vin_old %}
    | {{ -1*vin*account.value | currency }}
      {% $13+ -1*vin*account.value | currency: 2 %}
    {% newline %}
    {% if forloop.last %}
      |     
      | **{% =$21+ $11 as:currency %}** 
      |
      |   {% comment %}one column TOO MUCH{% endcomment %}
      | **{% =$23+ $13 as:currency %}** {% $1+ $13 as:currency %} {% comment %}there was an extra column here after{% endcomment %}
      |   {% comment %}one column TOO MUCH{% endcomment %}
    {% newline %}
    {% endif %}
    {% endfor %}
  {% result category_key $13 %}
  {% newline %}
    {% endifi %}
{% endfor %}
{% newline %}                
{% newline %}
-----------------------------------------------------------------------------------------------------------
{% newline %}                
{% newline %}
{% endstripnewlines %}

{{ header }}
| **{% t "Totaal" %}**                  | **{{ $21 | currency }}** | | **{{ $23 | currency }}**

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

{% endcapture %}

{% stripnewlines %}
{% newline %}
|---------------------|-------15%-------:|-------15%-------:|-------15%-------:+
{% newline %}
| {% t "Ontvangsten/Baten" %} {% input custom.detail.omzet as:account_collection range:global_7_range default:'70' %}| | | {%=$10+ -1*omzet.value | currency %}
{% assign omzet = period.accounts | range:omzet_range %}
{% for account in omzet %}
  {% $31+ account.value %}
  {% newline %}
  |      {{ account.name }}|{{ -1*account.value | currency }}
{% endfor %}
{% assign goederen = period.accounts | range:goederen_range %}
{% ifi goederen.value != 0 %}
{% newline %}
| {% t "Handelsgoederen, grond en hulpstoffen" %} {% input custom.detail.goederen as:account_collection range:global_6_range default:'60' %}| |{{ -1*goederen.value | currency }}  
{% for account in goederen %}
  {% $32+ account.value %}
  {% newline %}
  |      {{ account.name }}|{{ -1*account.value | currency }}
{% endfor %}{% endifi %}
{% assign voorraadwijziging = period.accounts | range:voorraadwijziging_range %}
{% ifi voorraadwijziging.value != 0 or custom.wijziging.voorraad != 0 %}
{% newline %}
| {% t "Voorraadwijziging" %} {% input custom.detail.voorraadwijziging as:account_collection range:global_range default:def_voorraadwijziging %} {% input custom.eindvoorraad.doc as:file %}| |{{voorraadwijziging_rows}}
{% ic %}{% newline %}| {% input custom.begin_eind.show as:boolean %} {% t "Toon beginvoorraad - eindvoorraad boekjaar" %} {% if custom.begin_eind.show == true %}{% input custom.begin_eind.range as:account_collection range:"3" %} {% unexplained wijziging_in_voorraad+(beginvoorraad-eindvoorraad) as:indicator %}{% endif %}
{% endic %}
{% if custom.begin_eind.show == true %}{% newline %}
|       {% t "Beginvoorraad" %} | {% input custom.voorraad.begin as:currency placeholder_default:acccounts_begin.value %}{% newline %}
|       {% t "Eindvoorraad" %} |  {% input custom.voorraad.eind as:currency placeholder_default:acccounts_eind.value %}
{% endif %}{% endifi %}
{% newline %}
| {% t "Verkochte goederen" %}|||_{%=$10+ (-1*goederen.value+wijziging_in_voorraad) | currency %}_
{% newline %}
| **{% t "Brutowinst" %}**        ||| **{{ $10 | currency }}**{% ifi custom.detail.sociale_bijdrage != blank %}
{% newline %}
| {% t "Sociale bijdragen" %} {% input custom.detail.sociale_bijdrage as:account_collection range:global_6_range %} {% input custom.sociale_bijdrage.doc as:file %}| | | {%=$10+ -1*sociale_bijdrage.value | currency %}{% result 'sociale_bijdrage' -1*sociale_bijdrage.value %}{% endifi %}{% ifi custom.detail.echtgenote != blank %}
{% newline %}
  | {% t "Toekenning meewerkende echtgeno(o)t(e)" %} {% input custom.detail.echtgenote as:account_collection range:global_6_range %} {% input custom.echtgenoot.doc as:file %} | | | {%=$10+ -1*echtgenote.value | currency %}{% result 'echtgenote' -1*echtgenote.value %}
  {% endifi %}
  {% assign bruto_winst = $10 %}

  | {% fori extra_kost in custom.extra_kosten %}
    {% newline %}
    |{% input extra_kost.name %} {% input extra_kost.accounts as:account_collection range:global_range %}{% input extra_kost.doc as:file %} | | |{% assign accounts = period.accounts.include_zeros | range:extra_kost.accounts %}{% if extra_kost.accounts != blank %}{% =$14+ accounts.value*-1 %}{% else %}{% $14+input extra_kost.value as:currency default:-1*accounts.value %}{% endif %}
  {% endfori %}{% $10+ $14 %}{% result "extra_kosten" $14 %}
{% newline %}
  | {% t "Kosten" %}              | | |_{% =$10+ $1 %}_
{% newline %}
  | **{% t "Nettoresultaat" %}**      | | | **{{ $10 | currency }}**
  {% comment %}result tag for SF Insights{% endcomment %}
  {% result 'nettoresultaat' $10 %}
{% newline %}
  |
  | {% fori extra_account in custom.extra_accounts %}
    {% newline %}
    |{% input extra_account.name %} {% input extra_account.accounts as:account_collection range:global_range %}{% input extra_account.doc as:file %} | | |{% assign accounts = period.accounts.include_zeros | range:extra_account.accounts %}{% if extra_account.accounts != blank %}{% =$10+ accounts.value*-1 %}{% else %}{% $10+input extra_account.value as:currency default:-1*accounts.value %}{% endif %}
  {% endfori %}
  |
{% endstripnewlines %}

{% newpage %}

{{ table }}

<!----------------------------------------- check to see if all accounts have been used JUST ONCE ----------------------------------------->

{% assign accounts = period.accounts.include_zeros | range:'6,7' %}
{% assign count_6_7 = accounts.count %}
{% assign toegewezen = toegewezen | remove:"$" %}
{% assign count_toegewezen = toegewezen | split:";" %}
{% assign toegewezen_range = count_toegewezen | join:"," %}
{% assign count_toegewezen = count_toegewezen.size %}

{% assign toegewezen_bedrag = period.accounts | range:toegewezen_range %}

{% assign niet_toegewezen = #6+#7-toegewezen_bedrag.value %}

{% ic %}
*{% t "Niet toegewezen bedrag" %} {{ niet_toegewezen | currency }}* {% unexplained niet_toegewezen as:indicator %}

{% if count_6_7 > count_toegewezen %}

{% stripnewlines %}
| *{% t "Nr." %}* | *{% t "Naam" %}* | *{% t "Bedrag" %}*
{% newline %}
|--7%--|----|----:#+
{% newline %}
{% for account in accounts %}
  {% unless toegewezen contains account.number %}
           | *{{ account.number }}* | *{{ account.name }}* | *{%=$30+ account.value | currency %}*
    {% newline %}
      {% if forloop.last %}
      |                      |                      | _*{{ $30 | currency }}*_ 
      {% endif %}
  {% endunless %}
{% endfor %}
{% endstripnewlines %}
{% endif %}

{% endic %}

<!------------------------------------------------------------------------------ END -------------------------------------------------------------------------------->

{% ifi custom.extra.bijlage.document or custom.extra.toelichting != blank %}<br>

{% stripnewlines %}
|------
|------
{% newline %}
| **{% t "Extra toelichting" %}**
| {% input custom.extra.bijlage as:file placeholder:'' %}
{% endstripnewlines %}

{% input custom.extra.toelichting as:text size:mini placeholder:'' %}
{% endifi %} 

If I’m not mistaken, you removed a column so you have 4 columns instead of 5 (in our Silverfin template we have 5), so… this means you have to change the code in every new line, so no more than 4 columns can be found.
If there are more than 4 columns (which are defined in the header var) then it breaks up the table (wrong alignment).

Can you have a second look, and try to fix it? Let us know if it works