Template Rechtvaardiging opgave 325.50

I have a problem with the template for a financial year 01/04/2016 - 31/12/2017 (longer than 12 months).

In the part Ogave 325.50, because the financial yar 2017 a full year is, I need an input field under the colum 01/01/2017 - 31/12/2017 for the lines Belastbaar opgave 325.50 en Belastbaar opgave 325.50 - bijkomend but I don’t have an input field.

Can you help me please?

Thanks,

Sylvie

Hello @svalais,

Just to be sure, you need 2 more inputs here and a new total as it is shown with the arrows in the screenshot?

Regards,
Michail

Hello,

Yes I need 2 more inputs and a total under the last colum.

Thanks,

Sylvie

Hello,

Do you have already a solution?

Thanks,

Sylvie

Hi @svalais,

Could you post the code that generates this table so I can reproduce it locally?

This is the code:

{% t= "Totaal boekjaar" fr:"Total exercice" en:"Total exercice" de:"Summe Geschäftsjahr" %}
{% t= "Commissies" fr:"Commissions aux tiers" en:"Third party commissions" de:"Provisionen an Dritte" %}
{% t= "Opgave 325.50" fr:"Relevé 325.50" en:"Statement 325.50" de:"Angabe 325.50" %}
{% t= "Belastbaar opgave 325.50" fr:"Relevé imposable 325.50" en:"Taxable statement 325.50" de:"Steuerbar, Angabe 325.50" %}
{% t= "Belastbaar opgave 325.50 - bijkomend" fr:"Relevé imposable 325.50 - complémentaire" en:"Taxable statement 325.50 - additional" de:"Steuerbar, Angabe 325.50 - zusätzlich" %}
{% t= "Totaal aangegeven" fr:"Total déclaré" en:"Total declared" de:"Summe deklariert" %}
{% t= "Commissies aan derden" fr:"Commissions aux tiers" en:"Third party commissions" de:"Kommissionen an Dritte" %}
{% t= "Erelonen en dienstverleningen" fr:"Honoraires et prestations de services" en:"Fees and service benefits" de:"Honorar" %}
{% t= "Dienstprestaties" fr:"Prestations de services" en:"Services received" de:"Dienstleistungen" %}
{% t= "Voordelen alle aard" fr:"Avantages toute nature" en:"Benefits in kind" de:"Sachleistungen" %}
{% t= "Totaal kalenderjaar" fr:"Total année calendrier" en:"Total calendar year" de:"Summe Kalenderjahr" %}

{% assign year_first_year = period.year_start_date | date:'%Y'%}
{% assign year_second_year = period.year_end_date | date:'%Y' %}

{% assign year_first_year3 = period.year_start_date | date:'%d/%m'%}
{% assign year_second_year3 = period.year_end_date | date:'%d/%m' %}

{% if (year_second_year-year_first_year >= 2) or (year_second_year-year_first_year > 1) %} {% assign verlengd3 = true %} {% else %} {% assign noverlengd3 = true %}{% endif %}
{% if (year_second_year3 == "31/12" and year_first_year3 == "01/01" and year_second_year != year_second_year) or (year_second_year3 == "30/12" and year_second_year != year_second_year) %} {% assign verlengd2 = true %} {% else %} {% assign noverlengd2 = true %} {% endif %}

{% assign year_first_year2 = year_first_year+1  %}
{% if period.year_end_date-period.year_start_date > 366 and year_second_year3 == "31/12" %}{% assign verlengd = true %}{% endif %}
{% if year_second_year != year_first_year %}{% assign gewone = true %}{% endif %}

{% assign accounts = #613000 %}
{% assign $5 = period.reconciliations.Commissies.results.totaal_y1 %}
{% assign $6 = period.reconciliations.Commissies.results.totaal_y2 %}
{% assign $7 = period.reconciliations.Commissies.results.totaal_y3 %}
{% assign $8 = period.reconciliations.Commissies.results.totaal_y4 %}

{% assign accounts2 = #613100__613101,#60,#22,#618,#300__370,#20 %}
{% assign $10 = period.reconciliations.Erelonen.results.totaal_y1 %}
{% assign $11 = period.reconciliations.Erelonen.results.totaal_y2 %}
{% assign $12 = period.reconciliations.Erelonen.results.totaal_y3 %}
{% assign $13 = period.reconciliations.Erelonen.results.totaal_y4 %}

{% assign accounts3 = #613130__613131 %}
{% assign $20 = period.reconciliations.Dienstprestaties.results.totaal_y1 %}
{% assign $21 = period.reconciliations.Dienstprestaties.results.totaal_y2 %}
{% assign $22 = period.reconciliations.Dienstprestaties.results.totaal_y3 %}
{% assign $23 = period.reconciliations.Dienstprestaties.results.totaal_y4 %}

{% ic %}*Version 2.0 dd 01/03/2017*{% endic %}

{% input custom.325_50.file as:file %}

|                                          | {% for year in period.calendar_years %}{% if forloop.first %}{% capture first_date %}{{ year.start_date | date:'%d/%m'  }}{% endcapture %}{% unless first_date == '01/01' %} 01/01/{{ year.start_date | date:'%Y' }} - {{ year.start_date-1 | date:'%d/%m/%Y' }}|{% assign first_date_not_broken = true %}{% endunless %}{% endif %}{{ year.start_date | date:'%d/%m/%Y' }} - {{ year.end_date | date:'%d/%m/%Y' }}|{% endfor %}**{% t "Totaal boekjaar" %}** |               
|-----------------------------------------+|-----------------------------------------:|-----------------------------------------:|-----------------------------------------:|-----------------------------------------:|-----------------------------------------:| {% if accounts.name '= blank %}
| {% t "Commissies aan derden" %}                      | {% assign $15 = 0 %}{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %} {{period.reconciliations.commissies.results.totaal_y1 |currency }}|{% endif %}{% case forloop.index0 %}{% when 0 %} {{period.reconciliations.commissies.results.totaal_y2 |currency }} {% when 1 %}{{period.reconciliations.commissies.results.totaal_y3 |currency }}{% when 2 %}{{period.reconciliations.commissies.results.totaal_y4 |currency }}{% endcase %}|{% endfor %}{{$6+$7+$8 |currency }} {% endif %} {% if accounts2.name '= blank %}
| {% t "Erelonen en dienstverleningen" %}                      | {% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %} {{period.reconciliations.Erelonen.results.totaal_y1 |currency }}|{% endif %}{% case forloop.index0 %}{% when 0 %} {{period.reconciliations.Erelonen.results.totaal_y2 |currency }} {% when 1 %}{{period.reconciliations.Erelonen.results.totaal_y3 |currency }}{% when 2 %}{{period.reconciliations.Erelonen.results.totaal_y4 |currency }}{% endcase %}|{% endfor %}{{$11+$12+$13 |currency }}{% endif %} {% if accounts3.name '= blank %}
| {% t "Dienstprestaties" %}                      | {% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %} {{period.reconciliations.Dienstprestaties.results.totaal_y1 |currency }}|{% endif %}{% case forloop.index0 %}{% when 0 %} {{period.reconciliations.Dienstprestaties.results.totaal_y2 |currency }} {% when 1 %}{{period.reconciliations.Dienstprestaties.results.totaal_y3 |currency }}{% when 2 %}{{period.reconciliations.Dienstprestaties.results.totaal_y4 |currency }}{% endcase %}|{% endfor %}{{$21+$22+$23 |currency }}{% endif %}
| {% t "Voordelen alle aard" %}                      | {% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %} {% $30+input custom.statement.325_50_y1 as:currency placeholder:'' %}|{% endif %}{% case forloop.index0 %}{% when 0 %} {% $31+input custom.statement.325_50_y2 as:currency placeholder:'' %} {% when 1 %}{% $32+input custom.statement.325_50_y3 as:currency placeholder:'' %}{% when 2 %}{% $33+input custom.statement.325_50_y4 as:currency placeholder:'' %}{% endcase %}|{% endfor %}{{$31+$32+$33 |currency }}
|_                                       _|_ {% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{% when 1 %}{% when 2 %}{% endcase %}_|_{% endfor %}_|{{ endfor }}
|_                                        _|_{% assign $15 = 0 %}{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}{{ $5+$10+$20+$30 | currency }}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{{ $6+$11+$21+$31| currency }}{% when 1 %}{{ $7+$12+$22+$32 | currency }}{% when 2 %}{{ $8+$13+$23+$33 | currency }}{% endcase %}_|_{% endfor %}{{ $6+$11+$21+$7+$12+$22+$8+$13+$23 | currency }}_|{{ endfor }}
|
|_**{% t "Totaal kalenderjaar" %}** **{{ year_first_year }}**_|_{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}{{ '' }}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{{ $6+$11+$21+$31+$5+$10+$20+$30 | currency }}{% when 1 %}{{ '' }}{% when 2 %}{{ '' | currency }}{% endcase %}_|_{% endfor %}_|_{% if verlengd and noverlengd2 %}
|_**{% t "Totaal kalenderjaar" %}** **{{ year_first_year2 | round | integer }}**_|_{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}{{ '' }}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{{ '' }}{% when 1 %}{{ $7+$12+$22+$32 | currency }}{% when 2 %}{{ '' }}{% endcase %}_|_{% endfor %}_|_{% endif %}{% if verlengd2 %} 
|_**{% t "Totaal kalenderjaar" %}** **{{ year_first_year-1 | round | integer }}**_|_{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}{{ '' }}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{{ '' }}{% when 1 %}{{ ' ' }}{% when 2 %}{{ $8+$13+$23+$33 }}{% endcase %}_|_{% endfor %}_|_{% endif %}
|                                          |                                          |
|**{% t "Opgave 325.50" %}**               |                                          |
|{% t "Belastbaar opgave 325.50" %}        | {% assign $15 = 0 %}{% for year in period.calendar_years %}{% if forloop.last %}{% unless forloop.first %}{% continue %}{% endunless %}{% endif %}{% if forloop.first and first_date_not_broken %} | {% endif %}{% $15+ custom.statement.325_50[forloop.index] %}{% case forloop.index0 %}{% when 0 %}{% $3+input custom.statement.325_50[forloop.index] as:currency placeholder:'' %}{% when 1 %}{% $14+input custom.statement.325_50[forloop.index] as:currency placeholder:'' %}{% when 2 %}{% $23+input custom.statement.325_50[forloop.index] as:currency placeholder:''%}{% endcase %} | {% endfor %}
|{% t "Belastbaar opgave 325.50 - bijkomend" %}      | {% assign $15 = 0 %}{% for year in period.calendar_years %}{% if forloop.last %}{% unless forloop.first %}{% continue %}{% endunless %}{% endif %}{% if forloop.first and first_date_not_broken %} | {% endif %}{% $15+ custom.statement.325_50_additional[forloop.index] %}{% case forloop.index0 %}{% when 0 %}{% $3+input custom.statement.325_50_additional[forloop.index] as:currency placeholder:'' %}{% when 1 %}{% $14+input custom.statement.325_50_additional[forloop.index] as:currency placeholder:'' %}{% when 2 %}{% $23+input custom.statement.325_50_additional[forloop.index] as:currency placeholder:''%}{% endcase %} | {% endfor %}
|_**{% t "Totaal aangegeven" %}**         _|_{% if verlengd %}{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}{{ '' }}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{{ $3 | currency }}{% when 1 %}{{ $14 | currency }}{% when 2 %}{{ '' }}{% endcase %}_|_{% endfor %}{% else %}{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %}{{ '' }}_|_{% endif %}{% case forloop.index0 %}{% when 0 %}{{ $3 | currency }}{% when 1 %}{{ '' }}{% when 2 %}{{ '' }}{% endcase %}_|_{% endfor %}{% endif %}

Hello @svalais,

Firstly I would like to ask you to check this guide. How to paste your code in a community post It will help you paste your code in a way which will be easier for everyone to read. I edited your post for you this time.

Regarding your issue now, there is an if / unless statement in your code that prevents it to do exactly what you want it to do. It is this part from the “Opgave 325.50” section:

{% if forloop.last %}{% unless forloop.first %}{% continue %}{% endunless %}{% endif %}

In short, this loop says that if your bookyear is the last one and if it is not the first one, then it will have to continue. And by continue we mean that it will have to skip all the other code and move to the next part of code. That’s why your inputs won’t appear for you.

Regards,
Michail

Hello,

I did this modification but now for a exercice from 01/07/2016 to 30/06/2017, I have also 2 fields and I need 1 field .

Tim has made the code for us because it was to complicate for me.

Can you check please?

Thanks,

Sylvie

Hello @svalais,

What modification did you do exactly? Did you delete the if / unless statement?

Regards,
Michail

Hello,

Yes, this is the code I now have:

|{% t "Belastbaar opgave 325.50" %}        | {% assign $15 = 0 %}{% for year in period.calendar_years %}{% if forloop.first and first_date_not_broken %} {% $15+ custom.statement.325_50[forloop.index] %} | {% endif %} {% case forloop.index0 %}{% when 0 %}{% $3+input custom.statement.325_50[forloop.index] as:currency placeholder:'' %}{% when 1 %}{% $14+input custom.statement.325_50[forloop.index] as:currency placeholder:'' %}{% when 2 %}{% $23+input custom.statement.325_50[forloop.index] as:currency placeholder:'' %}{% endcase %} | {% endfor %}

Thanks,

Sylvie

Hello,

My problem is solved.

Thanks,

Sylvie