Not aligned like in preview

Hi there,

In the preview, the alignment of the columns looks good, but not in the export.

How can this be solved?

Preview:

Export:

Kind regards,
Cedric

Hi @cedric.devos

Could you post the code here for your table?

Kind regards,
Kimberly

Hi Kimberly,

The template has a lot of code and I suggest you take a look in our environment if that’s possible?

Thanks in advance!

Vriendelijke groeten | Sincères salutations | Kind regards

Cedric De Vos

Advisor

T +32 50 40 63 11

Hi @cedric.devos

I would try adding this part to the definition of your table:

{% ic %}#{% endic %}{% nic %}+{% endnic %}

We try to avoid going to a specific environment for questions posted here, because we want to create an open discussion on the Silverfin Templating Language on the community.

Kind regards,
Kimberly

Hi Kimberly,

Where exactly? Below you can find the whole code (it’s a lot :sweat_smile:)

{% changeorientation "landscape" %}

{% include "parts/translations" %}

{% ic %}

**{::font size="xl"}{% t "Liquidation reserve" %}{:/font}**

{% endic %}

{% assign current_date = item.date %}
{% include "parts/variables" %}

{% assign accounts = period.accounts | range:"13" %}

{% addnewinputs %}
{% assign items = custom.items | sort:"date" %}
{% endaddnewinputs %}

{% assign opn_value = "" %}
{% assign opn_dates = "" %}
{% assign opn_index = 0 %}
{% assign current_tax = 0 %}
{% for item in items %}
  {% if item.amount < 0 %}
    {% assign total_to_be_liquidated = total_to_be_liquidated+ABS(item.amount) %}
    {% if item.amount < 0 %}
      {% assign opn_value = opn_value | append:ABS(item.amount) | append:";" %}
      {% assign current_date = item.date %}
      {% assign month = current_date | date:"%d/%m" %}
      {% assign year = current_date | date:"%Y" %}
      {% if month == "31/12" %}
        {% assign item_fiscal_year = INT(year+1) %}
      {% else %}
        {% assign item_fiscal_year = INT(year) %}
      {% endif %}
      {% assign opn_dates = opn_dates | append:item_fiscal_year | append:";" %}
    {% endif %}
  {% endif %}
{% endfor %}
{% assign opn_value = opn_value | split:";" %}
{% assign opn_size = opn_value.size %}
{% assign opn_dates = opn_dates | split:";" %}
{% assign current_opneming_bedrag = opn_value[opn_index] %}
{% assign current_opn_date = opn_dates[opn_index] %}

**{::font size="l"}{% t "Detail" %}{:/font}**

{% stripnewlines %}
{% ifi items.size > 0 %}
| {% t "Date" %}
| {% t "Description" %}
| {% t "Amount" %} {% input custom.accounts.liquidation as:account_collection range:"13" accounts_var:liquidation_accounts %}
| {% t "Special liquidation reserve" %}
| {% t "Taxation when recorded" %}
| {% t "Reduced taxation as of" %}
| {% t "Amount of the inclusion of the old liquidation reserve (FIFO) - previous TY" %}
| {% t "Transferred balances from the previous statement, to be shifted by one taxable period" %}
| {% t "Amount allocated to the liquidation reserve" %}
| {% t "Amount of the inclusion of the old liquidation reserve (FIFO) - current TY" %}
| {% t "Remaining balance" %}
{% newline %}
|--6%--
|----
|--7%--:
|:--7%--:
|--7%--:
|--6%--
|--7%--:
|--7%--:
|--7%--:
|--7%--:
|--7%--:#
{% newline %}
{% endifi %}
{% fori item in items %}
{% assign $0 = 0 %}
{% assign $1 = 0 %}
{% assign $2 = 0 %}
{% assign $3 = 0 %}
{% assign $4 = 0 %}
{% assign $5 = 0 %}
{% assign $6 = 0 %}
| {% input item.date as:date placeholder:"" %}
| {% input item.description placeholder:"" %}
| {% $0+input item.amount as:currency placeholder:0 %}{% $10+$0 %}
| {% input item.exceptional_liquidation_reserve as:boolean %}
{% assign current_date = item.date %}
{% include "parts/fiscal_year" %}
| {% if item.amount > 0 and item.amount != blank %}{{ perc | percentage }}{% endif %}
| {% if item_fiscal_year != blank %}{% if item.amount >= 0 %}{{ date_to_show }}{% endif %}{% endif %}
{% comment %}only show item.amount_inclusion_prev as input when first bookyear in silverfin{% endcomment %}
| {% if item_fiscal_year != blank %}{% if item_fiscal_year < current_fiscal_year and item.amount >= 0 %}{% $2+input item.amount_inclusion_prev as:currency placeholder:0 %}{% $12+$2 %}{% endif %}{% endif %}
| {% if item_fiscal_year != blank %}{% if item_fiscal_year < current_fiscal_year and item.amount >= 0 %}{% =$3+ $0+$2 %}{% $13+$3 %}{% endif %}{% endif %}
{% if item.amount < 0 %}
{% if ABS(item.amount) > reducted %}
{% assign too_much = ABS(item.amount)-reducted | currency %}
{::warningtext as="hover"}{% t "You have liquidated {{ amount }} too much" | amount:too_much %}{:/warningtext}
{% endif %}
{% assign reducted = reducted-$3 %}
{% endif %}
| {% if item_fiscal_year != blank %}{% if item_fiscal_year >= current_fiscal_year and item.amount >= 0 %}{% =$4+ item.amount%}{% $14+$4 %}{% endif %}{% endif %}
{% if $3 > 0 and total_to_be_liquidated > 0 %}
  {% if total_to_be_liquidated > $3 %}
    {% assign $5 = $3 %}
    {% assign total_to_be_liquidated = total_to_be_liquidated-$3 %}
    {% assign reducted = reducted+$3 %}
  {% else %}
    {% assign $5 = total_to_be_liquidated %}
    {% assign reducted = reducted+total_to_be_liquidated %}
    {% assign total_to_be_liquidated = 0 %}
  {% endif %}
  {% if INT(current_opneming_bedrag) > $3 and INT(opn_index) < INT(opn_size) %}
    {% assign current_opneming_bedrag = current_opneming_bedrag-$3 %}
    {% assign current_date = item.date %}
    {% include "parts/fiscal_year" %}
    {% include "parts/tax" %}
    {% if INT(current_opn_date) >= last_fiscal_year %}
      {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ lowered_perc | replace:".","_" }}{% endcapture %}
      {% assign [opneming_bedrag] = [opneming_bedrag]+$3 %}
    {% else %}
      {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ normal_perc | replace:".","_" }}{% endcapture %}
      {% assign [opneming_bedrag] = [opneming_bedrag]+$3 %}
    {% endif %}
  {% elsif INT(opn_index) < INT(opn_size) %}
    {% assign current_date = item.date %}
    {% include "parts/fiscal_year" %}
    {% include "parts/tax" %}
    {% if INT(current_opn_date) >= last_fiscal_year %}
      {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ lowered_perc | replace:".","_" }}{% endcapture %}
      {% assign [opneming_bedrag] = [opneming_bedrag]+current_opneming_bedrag %}
    {% else %}
      {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ normal_perc | replace:".","_" }}{% endcapture %}
      {% assign [opneming_bedrag] = [opneming_bedrag]+current_opneming_bedrag %}
    {% endif %}
    {% assign rest = $3-current_opneming_bedrag %}
    {% for i in (1..25) %}
      {% assign opn_index = INT(opn_index+1) %}
      {% assign current_opneming_bedrag = opn_value[opn_index] %}
      {% assign current_opn_date = opn_dates[opn_index] %}
      {% if INT(current_opneming_bedrag) > rest and INT(opn_index) < INT(opn_size) %}
        {% assign current_opneming_bedrag = current_opneming_bedrag-rest %}
        {% include "parts/tax" %}
        {% if INT(current_opn_date) >= last_fiscal_year %}
          {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ lowered_perc | replace:".","_" }}{% endcapture %}
          {% assign [opneming_bedrag] = [opneming_bedrag]+rest %}
        {% else %}
          {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ normal_perc | replace:".","_" }}{% endcapture %}
          {% assign [opneming_bedrag] = [opneming_bedrag]+rest %}
        {% endif %}
        {% break %}
      {% elsif INT(opn_index) < INT(opn_size) %}    
        {% include "parts/tax" %}
        {% if INT(current_opn_date) >= last_fiscal_year %}
          {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ lowered_perc | replace:".","_" }}{% endcapture %}
          {% assign [opneming_bedrag] = [opneming_bedrag]+current_opneming_bedrag %}
        {% else %}
          {% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ normal_perc | replace:".","_" }}{% endcapture %}
          {% assign [opneming_bedrag] = [opneming_bedrag]+current_opneming_bedrag %}
        {% endif %}
        {% assign rest = rest-current_opneming_bedrag %}
        {% assign opn_index = INT(opn_index+1) %}
        {% assign current_opneming_bedrag = opn_value[opn_index] %}
        {% assign current_opn_date = opn_dates[opn_index] %}
      {% else %}
        {% break %}
      {% endif %}
    {% endfor %}
  {% endif %}
{% endif %}
| {% =$15+-$5 %}
{% rollforward $5+$2 item.amount_inclusion_prev %}
{% assign saldo = $0+$2-$5 %}{% if saldo < 0 %}{% assign saldo = 0 %}{% endif %}
{% capture saldo_line %}saldo_{{ forloop.index0 }}{% endcapture %}
{% assign [saldo_line] = saldo %}
| {% =$6+ saldo %}{% $16+$6 %}
{% assign paid_taxes = paid_taxes+($6*perc) %}
{% newline %}
{% if forloop.last %}
|**{% t "Total" %}**
| 
| {% if liquidation_accounts.count > 0 %}{% unreconciled liquidation_accounts+$10 as:indicator %}{% endif %}**{{ $10 | currency }}**
|
|
|
|**{{ $12 | currency }}**
|**{{ $13 | currency }}**
|**{{ $14 | currency }}**
|**{{ $15 | currency }}**
|**{{ $16 | currency }}**
{% endif %}
{% endfori %}
{% endstripnewlines %}

<br />

{% assign opn_index = 0 %}
{% assign used_percs = used_percentages | split:";" | uniq %}

**{::font size="l"}{% t "Withdrawal" %}{:/font}**

{% assign total_div = 0 %}
{% assign total_liq = 0 %}
{% assign year_end_date = period.year_end_date | date:"%d/%m/%Y" %}

{% stripnewlines %}
| {% t "Date" %}
| {% t "Date from decision till withdrawal" %}
| {% t "Description" %}
| {% t "Payment regarding to settlement" %}
| {% t "Gross (before liquidation tax)" %} (voor liquidatie­belasting)
| {% t "Paid liquidation tax" %}
| %
| {% t "Withdrawal amount" %}
| {% t "Additional tax (withholding tax)" %}
| %
| {% t "Net" %}
| %
| {% t "Total tax" %}
| %
{% newline %}
|--9%--
|--9%--
|--12%--
|:--7%--:
|--9%--:
|--4%--:
|--9%--:
|--9%--:
|--9%--:
|--4%--:
|--9%--:
|--4%--:
|--9%--:
|--4%--:#
{% newline %}
{% for item in items %}
{% if item.amount < 0 %}
{% for prcntg in used_percs %}
{% capture opneming_bedrag %}opneming_bedrag_{{ opn_index }}_{{ prcntg | replace:".","_" }}{% endcapture %}
{% if [opneming_bedrag] != blank %}
{% if item.uitkering_vereffing %}
  {% assign opn_bedrag = 0 %}
  {% if item.date == year_end_date %}
    {% assign total_liq = total_liq+[opneming_bedrag] %}
  {% endif %}
{% else %}
  {% assign opn_bedrag = [opneming_bedrag] %}
  {% if item.date == year_end_date %}
    {% assign total_div = total_div+[opneming_bedrag] %}
  {% endif %}
{% endif %}
{% if item.uitkering_vereffing %}{% assign perc = 0 %}{% else %}{% assign perc = prcntg %}{% endif %}
{% assign tax = [opneming_bedrag]*0.1 %}
{% assign gross = [opneming_bedrag]+tax %}
{% assign opn_tax = opn_bedrag*perc %}
| {{ item.date }}
| {% input item.liquidation_date as:date placeholder:"" %}
| {{ item.description }}
| {% input item.uitkering_vereffing as:boolean %}
| {{ gross | currency }}
| {{ tax | currency }}
| {{ tax/[opneming_bedrag] | percentage }}
| {{ [opneming_bedrag] | currency }}
| {{ opn_tax | currency }}
| {{ perc | percentage }}
| {{ ([opneming_bedrag]-opn_tax) | currency }}
| {{ ([opneming_bedrag]-opn_tax)/gross | percentage }}
| {{ (tax+opn_tax) | currency }}
| {{ (tax+opn_tax)/gross | percentage }}
{% newline %}
{% endif %}
{% endfor %}
{% assign opn_index = INT(opn_index+1) %}
{% endif %}
{% endfor %}
{% endstripnewlines %}

<br />

**{::font size="l"}{% t "Withdrawal current taxable year as a result of dividend/settlement" %}{:/font}**

|--64%--|---:#
| {% t "Withdrawal current taxable year as a result of dividend" %} | {{ total_div | currency }}
| {% t "Withdrawal current taxable year as a result of settlement" %} | {{ total_liq | currency }}
| **{% t "Total" %}** | **{{ total_div+total_liq | currency }}**

<br />

{% newpage %}

**{::font size="l"}{% t "Status taxability" %}{:/font}**
{% assign gross_liq_reserve = $16*1.1 %}

|--64%--|---:#
| {% t "Status taxability" %} |
| {% t "Gross liquidation reserve" %} | {{ gross_liq_reserve | currency }}
| {% t "Paid tax" %} | {{ paid_taxes | currency }}
| {% t "Net liquidation reserve" %} | {{ $16 | currency }}

<br />

{% assign future_used_percs = "" %}

{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
{% for item in items %}
  {% capture saldo_line %}saldo_{{ forloop.index0 }}{% endcapture %}
  {% assign current_date = item.date %}
  {% include "parts/fiscal_year" %}
  {% include "parts/tax" %}
  {% capture total_year %}total_{{ i }}{% endcapture %}
  {% if last_fiscal_year != blank %}
    {% if i >= last_fiscal_year %}
      {% if  [saldo_line] != 0 %}
        {% capture total_sub %}total_{{ lowered_perc | replace:".","_" }}_{{ i }}{% endcapture %}
        {% assign [total_sub] = [total_sub]+[saldo_line] %}
        {% assign [total_year] = [total_year]+[saldo_line] %}
        {% assign future_used_percs = future_used_percs | append:lowered_perc | append:";" %}
      {% endif %}
    {% elsif i >= item_fiscal_year %}
      {% if [saldo_line] != 0 %}
        {% capture total_sub %}total_{{ normal_perc | replace:".","_" }}_{{ i }}{% endcapture %}
        {% assign [total_sub] = [total_sub]+[saldo_line] %}
        {% assign [total_year] = [total_year]+[saldo_line] %}
        {% assign future_used_percs = future_used_percs | append:normal_perc | append:";" %}
      {% endif %}
    {% endif %}
  {% endif %}
{% endfor %}
{% endfor %}

{% assign future_used_percs = future_used_percs | split:";" | uniq | sort %}

{% stripnewlines %}
|
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
| {{ i }}
{% endfor %}
{% newline %}
|--22%--
|--13%--:
|--13%--:
|--13%--:
|--13%--:
|--13%--:
|--13%--:+#
{% newline %}
| **{% t "Available for distribution" %}**
{% newline %}
{% for perc in future_used_percs %}
  | {% t "at" %} {{ perc | percentage | remove:",00" | remove:".00" }}
  {% for i in (current_fiscal_year..current_5y_fiscal_year) %}
    {% capture total_sub %}total_{{ perc | replace:".","_" }}_{{ i }}{% endcapture %}
    | {{ [total_sub] | currency }}
  {% endfor %}
  {% newline %}
{% endfor %}
| **{% t "Total" %}**
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
  {% capture total_year %}total_{{ i }}{% endcapture %}
| **{{ [total_year] | currency }}**
{% endfor %}
{% newline %}
| **{% t "Additional tax to be paid when distributed" %}**
{% newline %}
{% for perc in future_used_percs %}
  | {% t "at" %} {{ perc | percentage | remove:",00" | remove:".00" }}
  {% for i in (current_fiscal_year..current_5y_fiscal_year) %}
    {% capture total_sub %}total_{{ perc | replace:".","_" }}_{{ i }}{% endcapture %}
    {% capture total_tax_year %}total_tax_{{ i }}{% endcapture %}
    | {{ [total_sub]*perc | currency }}
    {% assign [total_tax_year] = [total_tax_year]+([total_sub]*perc) %}
  {% endfor %}
  {% newline %}
{% endfor %}
| **{% t "Total" %}**
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
{% capture total_tax_year %}total_tax_{{ i }}{% endcapture %}
| **{{ [total_tax_year] | currency }}**
{% endfor %}
{% newline %}
| **{% t "Total tax" %}**
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
{% capture total_tax_year %}total_tax_{{ i }}{% endcapture %}
| **{{ ([total_tax_year]+paid_taxes) | currency }}**
{% endfor %}
{% newline %}
| {% t "Total tax %" %}
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
{% capture total_tax_year %}total_tax_{{ i }}{% endcapture %}
| {{ (([total_tax_year]+paid_taxes)/gross_liq_reserve) | percentage }}
{% endfor %}
{% newline %}
| **{% t "Total net" %}**
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
  {% capture total_tax_year %}total_tax_{{ i }}{% endcapture %}
  {% capture total_year %}total_{{ i }}{% endcapture %}
| **{{ [total_year]-[total_tax_year] | currency }}**
{% endfor %}
{% newline %}
| {% t "Total net %" %}
{% for i in (current_fiscal_year..current_5y_fiscal_year) %}
  {% capture total_tax_year %}total_tax_{{ i }}{% endcapture %}
  {% capture total_year %}total_{{ i }}{% endcapture %}
| {{ ([total_year]-[total_tax_year])/gross_liq_reserve | percentage }}
{% endfor %}
{% endstripnewlines %}

Thanks a lot!

Hi @cedric.devos,

In the definition of your table:

|--6%--
|----
|--7%--:
|:--7%--:
|--7%--:
|--6%--
|--7%--:
|--7%--:
|--7%--:
|--7%--:
|--7%--:{% ic %}#{% endic %}{% nic %}+{% endnic %}
{% newline %}

Hope this works for you!

Kind regards,
Kimberly