Export report missing lines

Hi

I have following problem.
If i make an export of the report i do not see any detail below ‘sociale bijdrage’
I only see the total amount.

But if i open my template beroepskosten vrij beroep i see the accounts.
See picture below in yellow.

Can you please tell me how i solve this problem ?
I do not have this problem for the item ’ ontvangsten / baten’
Thank you

Kind regards
Nena

Hi Nena

This could be due to several different reasons. Could you share your code, please. This way, we can have a look at what the problem might be.

Kind regards
Sam

Hi Sam

Here is my code

{% t= “Detail van de kosten” fr:“Les Détails des frais” en:“Detail of all costs” %}
{% t= “Beroeps-
beperking” fr:“La limite professionnelle” en:“Occupational disability” %}
{% t= “Fiscale beperking” fr:“La limite fiscale” en:“Fiscal limitation” %}
{% t= “Totale beperking” fr:“La limite totale” en:“Total limitation” %}
{% 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= “Beginvoorraad” fr:“Le stock initial” en:“Initial stock” %}
{% t= “Eindvoorraad” fr:“Le 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 spous” %}
{% 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 or cost_keys_string == blank %}
{% assign cost_categories_string = “Kantoorkosten|Relatiegeschenken, Receptie- en Restaurantkosten|Vergoedingen aan derde|Huisvesting en Beroepslokalen|Verplaatsing- en Reiskosten|Rollend materieel|Afschrijvingen|Andere bedrijfskosten|Belastingen en Financiële Kosten|Financiële bedrijfsopbrengsten|Diverse” %}

{% assign cost_keys_string = “KK|RRR|vergoeding|HB|VR|RM|afschrijving|ABK|belasting|FBO|D” %}
{% endif %}
{% assign cost_categories = cost_categories_string | split:"|" %}
{% assign cost_keys = cost_keys_string | split:"|" %}

{% assign toegewezen = “” %}
{% assign count = 0 %}

{% capture header %}|-----------40%---------------|---------------12%-----------:|---------------12%-----------:|---------------12%-----------:|---------------12%-----------:|---------------12%-----------:+{% endcapture %}

{% capture table %}


{% stripnewlines %}
{{ header }}
{% newline %}
| {% t “Detail van de kosten” %}
|{{ period.year_end_date | date:’%Y’ }}
| {% t “Beroeps-
beperking” %}

({% t “Niet aftrekbaar” %})
| {% t “Fiscale beperking” %}
({% t “Niet aftrekbaar” %})
| {% t “Totale beperking” %}
| {% t “Aftrekbaar” %}
{% newline %}
{% newline %}

{% newline %}
{% newline %}
{% for cost_category in cost_categories %}
{% assign $11 = 0 %}
{% assign $12 = 0 %}
{% assign $13 = 0 %}
{% assign $14 = 0 %}
{% assign $15 = 0 %}
{% assign category_key = cost_keys[forloop.index0] %}

{% ifi custom[category_key].accounts != blank %}

{% newline %}
| {% t cost_category %} {% input custom[category_key].accounts as:account_collection range:6,7 accounts_var:costs %} |
{% newline %}
{{ header }}
{% newline %}
{% for account in costs %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}
| {{ account.name }}
| {%=$11+ -1account.value as:currency %}
| {% input custom[account.number].vin as:percentage placeholder:‘0.00%’ %}
{% if custom[account.number].vin == blank %}
{% assign vin = 1 %}
{% else %}
{% assign vin = 1-custom[account.number].vin placeholder:’’ %}
{% endif %}
{% $12+ -1
vinaccount.value as:currency %}
| {% input custom[account.number].beperking as:percentage placeholder:‘0.00%’ %}
{% if custom[account.number].beperking == blank %}
{% assign beperking = 1 %}
{% else %}
{% assign beperking = 1-custom[account.number].beperking %}
{% endif %}
{% $15+ -1
vinbeperkingaccount.value-(1-vin)account.value as:currency %}
| {{ account.value-1
vinbeperkingaccount.value | currency }}
{% $13+ -1vinbeperkingaccount.value as:currency %}
| {%=$14+ -1
vinbeperkingaccount.value as:currency %}
{% newline %}
{% if forloop.last %}
|
| {% =$21+ $11 as:currency %}
| {% =$22+ $11-$12 as:currency %}
| {% =$25+ $11-$15 as:currency %}
| {% =$23+ $11-$13 as:currency %}
| {% =$1+ $14 as:currency %}
{% result category_key $14 %}|
{% newline %}
{% endif %}
{% endfor %}
{% newline %}
{% endifi %}
{% endfor %}
{% newline %}
{% newline %}

{% newline %}
{% newline %}
{% endstripnewlines %}

{{ header }}
| {% t “Totaal” %} | {{ $21 | currency }} | {{ $22 | currency }} | {{ $25 | 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 %}

{% stripnewlines %}
{% newline %}
|---------------------|-------15%-------:|-------15%-------:|-------15%-------:+
{% newline %}
| {% 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 %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $31+ account.value %}
{% newline %}
|      {{ account.name }}|{{ -1
account.value | currency }}
{% endfor %}
{% ifi goederen.value != 0 %}
{% newline %}
| {% t “Aankoop goederen” %} {% input custom.detail.goederen as:account_collection range:6 default:‘60’ %}| |{{ -1goederen.value | currency }}
{% for account in goederen %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $32+ account.value %}
{% newline %}
|      {{ account.name }}|{{ -1
account.value | currency }}
{% endfor %}
{% newline %}
| {% t “Beginvoorraad NVT” %} {% input custom.detail.beginvoorraad as:account_collection range:6,7 accounts_var:beginvoorraad %} {% input custom.beginvoorraad.doc as:file %}| | {{ -1beginvoorraad.value | currency}}{% result ‘beginvoorraad’ -1beginvoorraad.value %}
{% for account in beginvoorraad %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $33+ account.value %}
{% endfor %}
{% newline %}
| {% t “Eindvoorraad NVT” %} {% input custom.detail.eindvoorraad as:account_collection range:6,7 accounts_var:eindvoorraad %} {% input custom.eindvoorraad.doc as:file %}| |{{ -1*eindvoorraad.value | currency}} {% result ‘eindvoorraad’ -1eindvoorraad.value %}
{% for account in eindvoorraad %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $34+ account.value %}
{% endfor %}
{% newline %}
| {% t “Verkochte goederen NVT” %}|||_{%=$10+ -1
(beginvoorraad.value+goederen.value+eindvoorraad.value) | currency %}_
{% newline %}
| {% t “Netto Baten” %} ||| {{ $10 | currency }}{% endifi %}{% ifi custom.detail.sociale_bijdrage != blank %}
{% newline %}
| {% t “Sociale bijdrage zelfstandige” %} {% input custom.detail.sociale_bijdrage as:account_collection range:618 accounts_var:sociale_bijdrage %} {% input custom.sociale_bijdrage.doc as:file %}| | | {%=$10+ -1sociale_bijdrage.value | currency %}{% endifi %}{% result ‘sociale_bijdrage’ -1sociale_bijdrage.value %}{% ifi custom.detail.echtgenote != blank %}
{% for account in sociale_bijdrage %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $35+ account.value %}
{% newline %}
| {{ account.name }}|{{ account.value | currency }}
{% endfor %}
{% newline %}
| {% t “Toekenning meewerkende echtgeno(o)t(e) NVT” %} {% input custom.detail.echtgenote as:account_collection range:6 accounts_var:echtgenote %} {% input custom.echtgenoot.doc as:file %} | | | {%=$10+ -1echtgenote.value | currency %}{% endifi %}{% result ‘echtgenote’ -1echtgenote.value %}
{% for account in echtgenote %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $36+ account.value %}
{% endfor %}
{% assign bruto_winst = $10 %}
{% newline %}
| {% t “Kosten” %} | | |{% =$10+ $1 %}
{% newline %}
| {% t “Nettoresultaat” %} | | | {{ $10 | currency }}
{% newline %}
|
{% fori extra_account in custom.extra_accounts %}
{% newline %}
|{% 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 %}
|
{% endstripnewlines %}

{% newpage %}

{{ table }}

{% assign accounts = period.accounts | range:‘6,7’ %}{% assign count_6_7 = 0 %}
{% for acc in accounts %}
{% assign count_6_7 = count_6_7 | plus:1 %}
{% endfor %}

{% assign count_toegewezen = toegewezen | split:";" %}
{% for acc in count_toegewezen %}
{% assign count = count | plus:1 %}
{% endfor %}

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

{% ic %}
{% t “Niet toegewezen bedrag” %} {{ niet_toegewezen | currency }} {% unexplained niet_toegewezen as:indicator %}

{% stripnewlines %}
{% if count == count_6_7 %}
{::infotext}{% t “Alle rekeningen zijn opgenomen” %}{:/infotext}
{% elsif count > count_6_7 %}
{::warningtext}{% t “Eén of meerdere rekeningen werden meermaals toegewezen” %}{:/warningtext}
{% else %}
{% assign show_niet_toegewezen = true %}
{::warningtext}{% t “Niet alle rekeningen zijn opgenomen” %}{:/warningtext}
{% endif %}
{% endstripnewlines %}

{% if show_niet_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 %}

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

{% stripnewlines %}

------

{% newline %}
| {% t “Extra toelichting” %}
| {% input custom.extra.bijlage as:file placeholder:’’ %}
{% endstripnewlines %}

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

Hope you can help me.

Kind regards Nena

Hi Nena

I had a quick look and already found the error.

You have to replace

{% ifi custom.detail.echtgenote != blank %}

by

{% ifi custom.detail.sociale_bijdrage != blank %}

Then all should work as expected.

Kind regards
Sam

Hi Sam

Sorry but do i just put the <> in front of my code? Or before each paragraph? And do i do this in the reply box or in my original text?
I’m not shure if i understand what you mean.

Kind regards
Nena

Hi Nena

Forget what I said earlier.
You might want to read this post for future posting of code though:

Has your problem been solved with the code above?

Kind regards
Sam

Like this?

{% t= "Detail van de kosten" fr:"Les Détails des frais" en:"Detail of all costs" %}
{% t= "Beroeps-<br />beperking" fr:"La limite professionnelle" en:"Occupational disability" %}
{% t= "Fiscale beperking" fr:"La limite fiscale" en:"Fiscal limitation" %}
{% t= "Totale beperking" fr:"La limite totale" en:"Total limitation" %}
{% 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= "Beginvoorraad" fr:"Le stock initial" en:"Initial stock" %}
{% t= "Eindvoorraad" fr:"Le 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 spous" %}
{% 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 or cost_keys_string == blank %}
 {% assign cost_categories_string = "Kantoorkosten|Relatiegeschenken, Receptie- en Restaurantkosten|Vergoedingen aan derde|Huisvesting en Beroepslokalen|Verplaatsing- en Reiskosten|Rollend materieel|Afschrijvingen|Andere bedrijfskosten|Belastingen en Financiële Kosten|Financiële bedrijfsopbrengsten|Diverse" %}

{% assign cost_keys_string = "KK|RRR|vergoeding|HB|VR|RM|afschrijving|ABK|belasting|FBO|D" %}
{% endif %}
{% assign cost_categories = cost_categories_string | split:"|" %}
{% assign cost_keys = cost_keys_string | split:"|" %}

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

{% capture header %}|-----------40%---------------|---------------12%-----------:|---------------12%-----------:|---------------12%-----------:|---------------12%-----------:|---------------12%-----------:+{% endcapture %}

{% capture table %}

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

{% stripnewlines %}
{{ header }}
{% newline %}
| **{% t "Detail van de kosten" %}**    
|**{{ period.year_end_date | date:'%Y' }}**
| **{% t "Beroeps-<br />beperking" %}**<br />**({% t "Niet aftrekbaar" %})**
| **{% t "Fiscale beperking" %}**<br />**({% t "Niet aftrekbaar" %})**
| **{% t "Totale beperking" %}**    
| **{% t "Aftrekbaar" %}**                      
{% newline %}                
{% newline %}
-----------------------------------------------------------------------------------------------------------
{% newline %}                
{% newline %}
{% for cost_category in cost_categories %}
  {% assign $11 = 0 %}
  {% assign $12 = 0 %}
  {% assign $13 = 0 %}
  {% assign $14 = 0 %}
  {% assign $15 = 0 %}
  {% assign category_key = cost_keys[forloop.index0] %}  
  
    {% ifi custom[category_key].accounts != blank %}
{% newline %}
  | **{% t cost_category %}** {% input custom[category_key].accounts as:account_collection range:6,7 accounts_var:costs %} |
  {% newline %}
  {{ header }}
  {% newline %}
  {% for account in costs %}
    {% assign toegewezen = toegewezen | append: account.number | append:";" %}
    | {{ account.name }}
    | {%=$11+ -1*account.value as:currency %}
    | {% input custom[account.number].vin as:percentage placeholder:'0.00%' %}
        {% if custom[account.number].vin == blank %}
          {% assign vin = 1 %}
        {% else %}
          {% assign vin = 1-custom[account.number].vin placeholder:'' %}
        {% endif %}
        {% $12+ -1*vin*account.value as:currency %}
    | {% input custom[account.number].beperking as:percentage placeholder:'0.00%' %}
      {% if custom[account.number].beperking == blank %}
        {% assign beperking = 1 %}
      {% else %}
        {% assign beperking = 1-custom[account.number].beperking %}
      {% endif %}
      {% $15+ -1*vin*beperking*account.value-(1-vin)*account.value as:currency %}
    | {{ account.value-1*vin*beperking*account.value | currency }}
      {% $13+ -1*vin*beperking*account.value as:currency %}
    | {%=$14+ -1*vin*beperking*account.value as:currency %}
    {% newline %}
    {% if forloop.last %}
      |     
      | **{% =$21+ $11 as:currency %}** 
      | **{% =$22+ $11-$12 as:currency %}** 
      | **{% =$25+ $11-$15 as:currency %}** 
      | **{% =$23+ $11-$13 as:currency %}** 
      | **{% =$1+ $14 as:currency %}**
      {% result category_key $14 %}|
    {% newline %}
    {% endif %}
  {% endfor %}
  {% newline %}
    {% endifi %}
{% endfor %}
{% newline %}                
{% newline %}
-----------------------------------------------------------------------------------------------------------
{% newline %}                
{% newline %}
{% endstripnewlines %}

{{ header }}
| **{% t "Totaal" %}**                  | **{{ $21 | currency }}** | {{ $22 | currency }} | {{ $25 | 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 %}

{% stripnewlines %}
{% newline %}
|---------------------|-------15%-------:|-------15%-------:|-------15%-------:+
{% newline %}
| {% t "Ontvangsten/Baten" %} {% input custom.detail.omzet as:account_collection range:7 default:'70' accounts_var:omzet %}| | | {%=$10+ -1*omzet.value | currency %}
  {% for account in omzet %}
  {% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $31+ account.value %}
  {% newline %}
  | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ account.name }}|{{ -1*account.value | currency }}
  {% endfor %}
{% ifi goederen.value != 0 %}
{% newline %}
| {% t "Aankoop goederen" %} {% input custom.detail.goederen as:account_collection range:6 default:'60' %}| |{{ -1*goederen.value | currency }}
  {% for account in goederen %}
  {% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $32+ account.value %}
    {% newline %}
    | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ account.name }}|{{ -1*account.value | currency }}
  {% endfor %}
{% newline %}
| {% t "Beginvoorraad **NVT**" %} {% input custom.detail.beginvoorraad as:account_collection range:6,7 accounts_var:beginvoorraad %} {% input custom.beginvoorraad.doc as:file %}| | {{ -1*beginvoorraad.value | currency}}{% result 'beginvoorraad' -1*beginvoorraad.value %}
  {% for account in beginvoorraad %}
    {% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $33+ account.value %}
  {% endfor %}
{% newline %}
| {% t "Eindvoorraad **NVT**" %} {% input custom.detail.eindvoorraad as:account_collection range:6,7 accounts_var:eindvoorraad %} {% input custom.eindvoorraad.doc as:file %}| |_{{ -1*eindvoorraad.value | currency}}_ {% result 'eindvoorraad' -1*eindvoorraad.value %}
  {% for account in eindvoorraad %}
    {% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $34+ account.value %}
  {% endfor %}
{% newline %}
| {% t "Verkochte goederen **NVT**" %}|||_{%=$10+ -1*(beginvoorraad.value+goederen.value+eindvoorraad.value) | currency %}_
{% newline %}
| {% t "Netto Baten" %}        ||| **{{ $10 | currency }}**{% endifi %}{% ifi custom.detail.sociale_bijdrage != blank %}
{% newline %}
| {% t "Sociale bijdrage zelfstandige" %} {% input custom.detail.sociale_bijdrage as:account_collection range:618 accounts_var:sociale_bijdrage %} {% input custom.sociale_bijdrage.doc as:file %}| | | {%=$10+ -1*sociale_bijdrage.value | currency %}{% endifi %}{% result 'sociale_bijdrage' -1*sociale_bijdrage.value %}{% ifi custom.detail.echtgenote != blank %}
{% for account in sociale_bijdrage %}
{% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $35+ account.value %}
    {% newline %}
    | {{ account.name }}|{{ account.value | currency }}
{% endfor %}
{% newline %}
  | {% t "Toekenning meewerkende echtgeno(o)t(e) **NVT**" %} {% input custom.detail.echtgenote as:account_collection range:6 accounts_var:echtgenote %} {% input custom.echtgenoot.doc as:file %} | | | {%=$10+ -1*echtgenote.value | currency %}{% endifi %}{% result 'echtgenote' -1*echtgenote.value %}
  {% for account in echtgenote %}
    {% assign toegewezen = toegewezen | append: account.number | append:";" %}{% $36+ account.value %}
  {% endfor %}
  {% assign bruto_winst = $10 %}
{% newline %}
  | {% t "Kosten" %}              | | |_{% =$10+ $1 %}_
{% newline %}
  | {% t "Nettoresultaat" %}      | | | **{{ $10 | currency }}**
{% newline %}
  |
  {% fori extra_account in custom.extra_accounts %}
{% newline %}
    |{% 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 %}
  |
{% endstripnewlines %}

{% newpage %}

{{ table }}


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

{% assign accounts = period.accounts | range:'6,7' %}{% assign count_6_7 = 0 %}
{% for acc in accounts %}
  {% assign count_6_7 = count_6_7 | plus:1 %}
{% endfor %}

{% assign count_toegewezen = toegewezen | split:";" %}
{% for acc in count_toegewezen %}
  {% assign count = count | plus:1 %}
{% endfor %}

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

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

{% stripnewlines %}
  {% if count == count_6_7 %}
    {::infotext}{% t "Alle rekeningen zijn opgenomen" %}{:/infotext}
  {% elsif count > count_6_7 %}
    {::warningtext}{% t "Eén of meerdere rekeningen werden meermaals toegewezen" %}{:/warningtext}
  {% else %}
    {% assign show_niet_toegewezen = true %}
    {::warningtext}{% t "Niet alle rekeningen zijn opgenomen" %}{:/warningtext}
  {% endif %}
{% endstripnewlines %}<br>

{% if show_niet_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 %}

@Dons

That’s perfect! :slight_smile:

Kind regards
Sam