Sure, we use quite a lot of the known coding of Liquid, but in some cases, we’ll invent our own code that use a logic behind it, we need.
The purpose of this case, is to make an overview of all these codings. So you won’t find it anywhere if you google it.
This list will be updated from time to time.
1. is_first_bookyear
As the name explains, this is a boolean (true or false) we can use to check if the period we’re in, is in the first book year (as defined in the client information).
example of use
{% if period.is_first_year %}
First book year here
{% else %}
Not the first...
{% endif %}
or
{% assign first_book_year = period.is_first_year %}
{% if first_book_year %}
This is the first book year
{% else %}
NOT the first book year
{% endif %}
2. exists
This boolean checks if the period exists, but in most of the cases, we’ll use it to check if the period exists of last year.
example of use
{% assign previous_period = period.minus_1y %}
{% if previous_period.exists %}
{{ #10:1y %}
3. active_as_director
The drop {{ period.directors }} shows a list of all directors, no matter what the end date of the mandat is.
So following code gives you all the directors :
{% for director in period.directors %}
{{ director.name }}
{% endfor %}
If you want to filter on only the active directors during the book year then you can add a filter on the drop period.directors, like this :
{% for director in period.directors.active_as_director %}
{{ director.name }}
{% endfor %}
This will result in a list of all the directors that have an end date of their mandat during the book year, or have no end date at all.