Export disclosures

Hello,

We have created a style where we export all the disclosures available in a dossier.

The problem is that the unstared disclosures also are esported.

Wat can we change in the following code to do this?

``{% capture sf_default_detail_template %}
{% raw %}
{% unless current_account.details.count == 0 and current_account.value == 0 %}
{% for detail in current_account.details %}{% if forloop.first %}|-----|----14%-----:|-----14%------:+{% endif %}
| {{detail.title}}{% if detail.description != blank %}
{{detail.description | multiline_table}}{% endif %}{% if detail.custom.document %}
{% input detail.custom.doc as:file %}{% endif %} |{% if current_account.liability_or_income %}{{-1*detail.value | currency}}{% else %}{{detail.value | currency}}{% endif %}|   {% endfor %}
{% endunless %}
{% endraw %}
{% endcapture %}

{% for account_or_text in period.reconciliations %}

{% if account_or_text.is_account %}

{% if forloop.first %}
{% if new_page %}{% newpage account_or_text.preferred_orientation %}{% endif %}{% assign new_page = true %}
{% changeorientation account_or_text.preferred_orientation %}
{::group}
{% else %}
{% changeorientation account_or_text.preferred_orientation %}
{::group}
{% endif %}

|------------|------15%------:+0097A9
| {{ account_or_text.number }} {{ account_or_text.name }} | {{ account_or_text.value | currency }}

{{ account_or_text.rendered_template }}


{:/group}

{% else %}

{% if forloop.first %}
{% if new_page %}{% newpage account_or_text.preferred_orientation %}{% endif %}{% assign new_page = true %}
{% changeorientation account_or_text.preferred_orientation %}
{::group}
{% else %}
{% changeorientation account_or_text.preferred_orientation %}
{::group}
{% endif %}

|--------
|{{ account_or_text.name }}

{{ account_or_text.rendered_template }}


{:/group}

{% endif %}

{% endfor %}``

Thanks,

Sylvie

Hello @svalais,

You pasted your code not the right way (seen this before - you can see how it should be done here :

I always do 3 backticks, then ENTER ENTER then pasting my code and ENTER ENTER followed again by 3 backticks. Could you try that in the future? Let me know if that doesn’t work for you).

Back on topic:

I think it’s better to call on this :


{% for account_or_text in export.selected_accounts_and_reconciliation_texts.8 %} 

instead of


{% for account_or_text in period.reconciliations %} 

That last is just calling on the details of recon templates; the first let’s you actually decide in the background that unstarred recon details shouldn’t be exported.

Hello,

When I use your code I only have the starred reconciliations with a red triangle or green circle but not the starred reconciliations with grey or yellow square.

Can you help me?

Can I also use the same code for {% for account_or_text in period.accounts %} to have only the starred accounts?

Thanks,

Sylvie

Hello @svalais,

It should show all starred recon templates with a virtual account number beginning with 8, no matter if you have a red triangle, green dot or yellow/grey square.

What code did you actually use? Are the recon templates with grey or yellow square by any chance missing a virtual account number?

Hello,

My question was which code I need to use to have an export of only starred disclosures and also starred accounts.

Thanks,

Sylvie

Hi @svalais,

Then you need to make a forloop over these drops / collections for the accounts :


{% for account_or_text in export.selected_accounts_and_reconciliation_texts.1__7 %}
...  
{% endfor %}

Above code is only for the accounts 1 till 7 then.

If you wish to add the disclosures as well (and I think there are recon templates with a certain virtual number, f.i. 85 ?), then you’ll need to create a second forloop as well :


{% for account_or_text in export.selected_accounts_and_reconciliation_texts.85 %}
...  
{% endfor %} 

Hope this is what you’re looking for; should work.

Hello,

My question is old and perhaps you have new solutions for this.

We are less working with a virtual number.

Do you have today a solution to export only the disclosures or accounts who are starred?

Thanks,

Sylvie

Hello,

Can you give me an answer please?

Thanks,

Sylvie

Hello,

Can you give me a answer please?

Thanks,

Sylvie

Hi Sylvie,

At the moment if an account or reconciliation template is not starred on the main working screen, it won’t appear on the export selection (see image below):

Could you specify where and how are your unstarred accounts being exported?

Best,
Borja

Hi Borja,

In the file Valais Sylvie in the work file I have the following:

In the selection of the export with name “NL_WF_Toelichtingen” or the name “NL_WF_Toelichtingen TY2019”, you will see that these disclosures are not selected.

When I do an export of the export with name “NL_WF_Toelichtingen” or the name “NL_WF_Toelichtingen TY2019”, I have the Estimated taxes, Notional Interest deduction, … in my export.

Can you have a look please?

Thanks a lot,

Sylvie

Hi Sylvie,

I can see now what the issue is and I think I have found a solution. In your detail text I have replaced the following line:

{% for account_or_text in period.reconciliations %}

with this other:

{% for account_or_text in export.selected_accounts_and_reconciliation_texts %}

With the first statement the export was retrieving all the disclosures initially selected when you created the bundle but with the second we are telling the system to filter only the ones on the export selection. I have applied this change on “NL_WF_Toelichtingen" so double check if it works as expected and if so you can then apply the same change to your other bundle.

Best,
Borja