Hi,
I am trying to create a template in which we want to check if an ID of a director/shareholder has expired or not.
For this, I want the name and a timestamp of the person checking this.
However, I am having problems with the code related to “update_by.name” and updated_at.
the provisional code looks like this:
{% stripnewlines %}
{% newline %}
|Bedrijfsleiders
|Begin mandaat
|Einde mandaat
|ID op to date?
|Actie
|Naam
|datum
{% newline %}
|---
|---:
|---:
|---:
|---:
|---:
|---:
{% ic %}#{% endic %}{% nic %}+{% endnic %}
{% for director in period.directors %}
{% comment %}-----controleer per Bedrijfsleider aantal dagen benoeming ten opzichte van vandaag-----{% endcomment %}
{% assign mandaat_bedrijfsleider_vervaldatum = director.director_end_date | date:"%d/%m/%Y" %}
{% capture mandaat_bedrijfsleider_vervallen %}mandaat_{{ director.key }}{% endcapture %}
{% assign [mandaat_bedrijfsleider_vervallen] = today-mandaat_bedrijfsleider_vervaldatum %}
{% comment %}-------- als einddatum vervaldag bedrijfsleider niet ingevuld is of als benoeming kleiner is dan 730 dagen ten opzichte van vandaag: -----{% endcomment %}
{% if mandaat_bedrijfsleider_vervaldatum == blank or [mandaat_bedrijfsleider_vervallen] < 730 %}
{% assign words = director.name | split: ' ' %}
{% assign lastname = "" %}
{% assign person_first_name = "" %}
{% assign current_signature = "" %}
{% for word in words %}
{% if forloop.last %} {% comment %}correct for syncs like adminis{% endcomment %}
{% assign person_first_name = word %}
{% else %}
{% assign lastname = lastname | append:" " | append:word %}
{% endif %}
{% endfor %}
{% newline %}
{% if director.custom.first_name == blank and director.custom.last_name == blank %}
{% assign current_signature = director.name %}
{% elsif director.custom.first_name == blank and director.custom.last_name != blank %}
{% assign current_signature = director.name %}
{% elsif director.custom.first_name != blank and director.custom.last_name == blank %}
{% assign current_signature = director.name %}
{% else %}
{% assign current_signature = current_signature | append:director.custom.first_name | append:" " | append:director.custom.last_name %}
{% endif %}
{% if director.custom.represented_by_name != blank %}
{% assign default_type = "legal" %}
{% else %}
{% assign default_type = "nature" %}
{% endif %}
{% assign type = director.custom.type | default:default_type %}
|{{ current_signature }}{% if type == "legal" and director.custom.represented_by_name != blank %} met als vaste vertegenwoordiger {{ director.custom.represented_by_name }}{% endif %}
|{{ director.director_start_date | date:"%d/%m/%Y" }}
|{{ director.director_end_date | date:"%d/%m/%Y" }}
|{% input director.custom.id as:select options:'Ja|Nee' %}
|{% if director.custom.id == 'Ja' or director.custom.id == 'Oui'%}**{% t "Geen actie vereist" %}**{% endif %}
{% if director.custom.id == 'Nee' or director.custom.id == 'Non' %}{% result 'idvervallen' if director.custom.id == 'Nee' or director.custom.id == 'Non' %}{% ic %}{::warningtext}{% t "Vraag in More Than Figures de ontbrekende ID's op." %}{:/warningtext}{% endic %}{% endif %}
|{{ director.custom.id.updated_by.name }}
|{{ director.custom.id.updated_at | localized_date:"%d/%m/%y" }}
{% else %}
{% comment %}----- als benoeming groter of gelijk aan 730 dagen is ten opzichte van vandaag: toon niets---{% endcomment %}
{% endif %}
{% endfor %}
{% endstripnewlines %}
The following lines are faulty:
|{{ director.custom.id.updated_by.name }}
|{{ director.custom.id.updated_at | localized_date:"%d/%m/%y" }}