Details do not export

Hi

I made an overview per year of all the investments per categorie / account.
But when I export not all the lines get exported…

I figured out that details with a date previous to “end first bookyear” do not export but now other lines do not export as well.
So this is the text in the editing mode:

This is the export:

so as you can see the detail of the last line does not export.

More info: details were made with the template “depreciation and investments table”
The overview is a text.

Hi @Julie_Vandekerckhove,

Your table is looking really good!

We understand your question concerning the export of the table, however in order to properly help you with your query, we will need to see the liquid code of the template. Would it be possible to share your code so we can have a detailled look?

Thank you!

Kind regards,
Robin

Off course:

(part of the code; )

{::group}

{% if period.reconciliations.vaste_activa.results.inst_mach_en_uitr_aw_begin_bj != blank or period.reconciliations.vaste_activa.results.inst_mach_en_uitr_inv_plus_bj != blank %}
**B. Installaties, machines en uitrusting**{% input company.custom.activa.inst as:account_collection range:2 default:23 accounts_var:accounts %}

{% for acc in accounts %}
{% assign current_account = acc %}{% comment %}{{current_account}}{% endcomment %}
{% capture titel %}titelinst{{forloop.index}}{% endcapture %}

 _{% input company.custom.activa.[titel]  default:current_account.name %}_ 
 
 {% assign $3 = 0 %}

{% addnewinputs %}
  {% assign details = current_account.details | sort:'date' %}
{% endaddnewinputs %}

|Jaar|Vorige aanw.|a/b|Aanw. dit jaar|Waarde op balans datum| % |Vorige afschr.|a/b|Afschr. dit jaar|Totale afschr.|Boekwaarde
|:--8%--|---10%--:|--4%--:|--12%----------:|--12%----------------:|--4%--:|--12%--------:|--4%--:|---12%-----:|---11%-------:|--11%-:+{% fori detail in details %}
{%stripnewlines %}
{% comment %}when date is input, we can create the book year it belongs to{% endcomment %}
  {% if detail.date == blank %}
    {% assign new_year = "" %}
  {% else %}{% assign new_year = company.periods[detail.date].year_end_date | date:'%Y' %}
  {% endif %}
  {% comment %}display the total of each book year only when the last detail is given of each book year{% endcomment %}
{% if current_year != blank and current_year != new_year %}{% newline %}
|:--8%--|---10%--:|--4%--:|--12%----------:|--12%----------------:|--4%--:|--12%--------:|--4%--:|---12%-----:|---11%-------:|--11%-:+{% newline %}
|{% if gebrokenbj %}{% assign previous_year = current_year | minus:1 %}{{previous_year |replace:"20" | text}}/{{current_year |replace:"20" | text}} {%else%}{{ current_year }} {% endif %}{% comment %}jaar{% endcomment %}
|{% if $4 !=0 %}{{$4 | currency }}{%else%}-{% endif %}{% assign $14 = $14+$4 %}{% comment %}vorige aanw. {% endcomment %}
|{% if $3 !=0 %}a{% endif %} {% comment %}a/b{% endcomment %}
|{% if $3 !=0 %}{{$3 | currency}}{%else%} {% endif %}{% assign $13 = $13+$3 %}{% comment %}aanw. dit jaar{% endcomment %}
|{% assign $2 = $4+$3 %}{{$2 | currency}}{% assign $12 = $12+$2 %}{% comment %}waarde op balans datum{% endcomment %}
|{% if $9 != 0 %} {{100/$9 | integer}}% {%else%} - {% endif %}
|{{ $5 | currency }}{% assign $15 = $15+$5 %} {% comment %}Vorige afschr{% endcomment %}
|{% if $6 !=0 %}a{% endif %}
|{{ $6 | currency}}{% assign $16 = $16+$6 %}{% comment %}Bijkomende afschr{% endcomment %}
|{% assign $8 = $5+$6 %}{{$8 | currency}} {% assign $18 = $18+$8 %} {% comment %}totale afschr{% endcomment %}
|{% assign $7 = $2-$8 %} {{ $7 | currency}}{% assign $17 = $17+$7 %}{% comment %}Boekwaarde{% endcomment %}
{% assign current_year = new_year %}
{% comment %}at the end of each book year, we will need to reset the register $4{% endcomment %}
{% assign $4 = 0 %}{% assign $5 = 0 %}{% assign $6 = 0 %} {% assign $7 = 0 %} {% assign $3 = 0 %}{% endif %} 
{% if current_year == blank %}{% assign current_year = new_year %}
{% endif %}{% $4+ detail.value %}
{% $5+ detail.custom.vorige_afschr %} {%$6+ detail.custom.dit_jaar %} {% assign $9 = detail.custom.jr %} {% if current_year == LaatsteJaar %}{% $3+ detail.value %} {% assign $4 = 0 %}{%else%} {%assign $3 = 0 %} {%endif%}{%endstripnewlines%}

{% endfori %}


{% comment %}subtotaal{% endcomment %}
{% if acc.name == current_account.name %}
|:--8%--|---10%--:|--4%--:|--12%----------:|--12%----------------:|--4%--:|--12%--------:|--4%--:|---12%-----:|---11%-------:|--11%-:+
{%stripnewlines %}
| **Totaal** {% comment %}Year{% endcomment %}
|**{{$14 | currency}}** {% assign $24 = $24+$14 %} {% assign $14 = 0 %} {% comment %}vorige aanwerving{% endcomment %}
|{% if $13 !=0 %}a{% endif %}
|**{{$13 | currency}}** {% assign $23 = $23+$13 %} {% assign $13 = 0 %}{% comment %}aanwerving dit jaar{% endcomment %}
|**{{$12 | currency}}** {% assign $22 = $22+$12 %} {% assign $12 = 0 %} {% comment %}waarde op balans datum{% endcomment %}
|
|**{{$15 | currency}}** {% assign $25 = $25+$15 %} {% assign $15 = 0 %}{% comment %}Vorige afschrijvingen{% endcomment %}
|{% if $16 !=0 %}a{% endif %}
|**{{$16 | currency}}** {% assign $26 = $26+$16 %} {% assign $16 = 0 %}{% comment %}Bijkomende afschr{% endcomment %}
|**{{$18 | currency}}** {% assign $28 = $28+$18 %} {% assign $18 = 0 %}
|**{{$17 | currency}}** {% assign $27 = $27+$17 %} {% assign $17 = 0 %}
{%endstripnewlines%}
{% endif %}


{% endfor %}

|        |        |       |                |                      |       |              |       |            |              |  
|:--8%--|---10%--:|--4%--:|--12%----------:|--12%----------------:|--4%--:|--12%--------:|--4%--:|---12%-----:|---11%-------:|--11%-:+
{%stripnewlines %}
|**Totaal III B.**
|**{{$24 | currency }}** {%assign $34 = $34+$24 %} {% assign $24 = 0 %} {% comment %}vorige aanwerving{% endcomment %}
|{% if $23 !=0 %}a{% endif %}
|**{{$23 | currency }}** {% assign $33 = $33+$23 %} {% assign $23 = 0 %}{% comment %}aanwervingen dit jaar{% endcomment %}
|**{{$22 | currency }}** {% assign $32 = $32+$22 %}{% assign $22 = 0 %}
|
|**{{$25 | currency}}** {% assign $35 = $35+$25 %} {% assign $25 = 0 %}{% comment %}Vorige afschrijvingen{% endcomment %}
|{% if $26 !=0 %}a{% endif %}
|**{{$26 | currency}}** {% assign $36 = $36+$26 %} {% assign $26 = 0 %}{% comment %}Bijkomende afschr{% endcomment %}
|**{{$28 | currency}}** {% assign $38 = $38+$28 %} {% assign $28 = 0 %}{% comment %}totale afschrijv{% endcomment %}
|**{{$27 | currency}}** {% assign $37 = $37+$27 %} {% comment %}boekwaarde{% endcomment %} {% if $27 != period.reconciliations.vaste_activa.results.inst_mach_en_uitr_netto_bw_bj%}{%newline%}
|{% ic %}*Controle lijn:*{% endic %} 
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_aw_begin_bj | currency}}*{% endic %}
|
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_inv_plus_bj | currency}}*{% endic %}
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_aw_einde_bj | currency}}*{% endic %}
|
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_af_begin_bj | currency}}*{% endic %}
|
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_af_plus_bj | currency}}*{% endic %}
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_af_einde_bj | currency}}*{% endic %}
|{% ic %}*{{period.reconciliations.vaste_activa.results.inst_mach_en_uitr_netto_bw_bj | currency}}*{% endic %}
{% endif %}{% assign $27 = 0 %}{%endstripnewlines%}


{%endif%} {% comment %}end if indien geen installaties{% endcomment %}
{:/group}

Hi @Julie_Vandekerckhove,

Have you tried changing the

{% fori detail in details %}

into a for-loop?

{% for detail in details %}

This might already solve your issue.

Kind regards,
Robin

Hi @robindeclercq

The export still looks the same.

Could you also lend me a hand in making my code shorter / more efficient?

For now I copied parts of the code for the different categories but I can’t seem to figure out how to get the same result with some loops and categories.

Hi @Julie_Vandekerckhove,

In order to figure out what is going wrong, we suggest that you contact us via chat (helpdesk) so we can have a look at the complete code in your environment.

Thank you!

Kind regards,
Robin

Hi Robin

I’ve put in a helpdeks request to help with this issue. If you could help me out, that would be great!

Thanks a lot

Hi @Julie_Vandekerckhove,

I can see that the last loop iteration keeps disappearing when exporting. We need to investigate further to find out what the problem is but will get back to you as soon as possible.

In regards to the amounts changing values, the problem might come as a result of the $3 register value being accumulated from the first table. If you write {%assign $3 = 0 %} before the tables the values should be accurate in export mode.

Best,
Borja