Text NL - Financiële analyse - Ratio's

Hello,

In this text, I’m using the enddate of eacht financial year (period.year_end_date,period.minus_1y.year_end_date,period.minus_2y.year_end_date,…).

This is ok for a dossier with periodicity Year.

My problem is now is you have a dossier with periodicity Month (ex. 03/2017) or Quarter (Q1/2017), which code do I have to use to have above the colomun 03/2017 or Q1/2017?

Hello @svalais,

The variable you want, is this :

{{ period.end_date }}

A list of all the variables we use, can be find here.

In your case, you’ll need a date-filter though, like this :

{{ period.end_date | date:'%m/%Y' }}

This will result in 06/2016 for instance. An overview of date-filters can be found here.

To show Q2 instead of 06/2016, is a little bit more tricky.

We have to run over all the period, and give each period a number (number of the month that is):

{% for month in period.month_end_dates %}
{% assign month_name = month | date:'%-m'%}{{ month_name }}
{% endfor %}

This will result in
1
2
3
4
5
6
7
8
9
10
11
12

The, you can use a if-statement to convert period 3 to Q3 for instance, just like this :

{% for month in period.month_end_dates %}
{% assign month_name = month | date:'%-m'%}
{% if month_name == '3' or month_name == '6' or month_name == '9' or month_name == '12' %}Q{{ month_name/3 | integer }}{% endif %}
{% endfor %}

this will result in Q1,Q2,Q3 and Q4.

Could you try with this ?

Let me know if you’re stuck.

Hello,

This is not the result I need because we always taken the enddate of the financial year of the customer.

My problem is for a customer where we import amounts in each month of het financial year (for example 01/2016, 02/2016, 03/2016, …) this is not the enddate of the financial year but the date of each month.

Which code do I need to use?

Can we do a check on the field Report by?

Thanks,

Sylvie

Hello,

We are more and more working with situation and we have urgently need an answer because we are working with the ratio’s for the discussion with the client.

Thanks,

Sylvie

Hello,

When can I receive a answer?

Thanks,

Sylvie

@svalais,

Could you explain me into detail what field exactly do you wish to display? I thought it was either the enddate of each period (solution is above) but your post 18 days ago suggests you need the enddate of the financial year?

Because that’s given as well.

Maybe you can post the whole code, so it becomes clearer? Sorry for the delay.

hello,
I will try it next week.
Thanks,

Sylvie

Hello,

It’s working but how can I test when the dossier is filling in month, quarter of year? Wat is the name of the field in the dossier properties?

Thanks,

Sylvie

Hello @svalais,

You can’t check on that, but isn’t this fixed by just using {{ period.name }} ?

Hello,

Thanks but I don’t need the information anymore.

Sylvie