Hallo,
We made our own export of the corrections in Excel but the sorting is nog OK.
Wat did we need to change in our code to receive first all external corrections from 1 to … and the all internal corrections from 1 to …?
This is our code:
{% stripnewlines %}
{%assign adjs = period.adjustments %}
{% for adjustment in adjs %}
{%assign lineindex = 0%}{% for transaction in adjustment.transactions %}
{%assign lineindex = lineindex+1%}
{% assign adj_number = adjustment.number %}
{%if adjustment.internal? %}
{% assign adj_type = "internal" %}
{%else%}
{% assign adj_type = "external" %}
{%endif%}
{% assign tran_account_deloitte = transaction.account.number %}
{% assign tran_account_klant = transaction.account.original_number %}
{% assign tran_account_desc_deloitte = transaction.account.name %}
{% assign tran_account_desc_klant = transaction.account.original_name %}
{% assign tran_description = transaction.description %}
{% if transaction.value > 0 %}{%assign tranval = transaction.value %}{%else%}{%assign tranval = (-1)*transaction.value %}{% endif %}
{%capture xlsdecimal%}{{ tranval | currency }}{%endcapture%}{%capture newval%}{{xlsdecimal | replace: ".", "" | replace: ",", "" | replace: " ", "" }}{%endcapture%}{%assign len =newval|size %}{%capture xlsdecimal%}{{newval | slice: 0, (len-2)}},{{newval | slice: -2,2}}{%endcapture%}
{%if lineindex == 1%}{{ adj_type }};#{{ adj_number }}{%newline%}{%endif%}
{{ tran_account_deloitte }};{{ tran_account_klant }};{{ tran_account_desc_deloitte }};{{ tran_account_desc_klant }};{{ tran_description }};{% if transaction.value > 0 %}{{xlsdecimal}}{% endif %};{% if transaction.value < 0 %}{{xlsdecimal}}{% endif %}{%newline%}
{%endfor%}{%newline%}
{%endfor%}
{% endstripnewlines %}
Thanks,
Sylvie