Signature directors in minutes

In the signatures in one of our minutes, I will use the same principle than the signatures in the Identification details from workflow Annual accounts.

I give in my minutes a list of all the directors from the company parameters.

The user need to select the name to keep on the minutes.

The code is working but I have a problem with the layout in Preview or Export.

This is my code:

“”{% if period.directors.count > 1 %}De bestuurders:
{% assign columns3 = 3 %}
{% assign aantal_zaakvoerders3 = period.directors.count %}
{% if aantal_zaakvoerders3 > columns3 %}{% assign aantal_kolommen3 = columns3 %}{% else %}{% assign aantal_kolommen3 = aantal_zaakvoerders3 %}{% endif %}

|------{% for i in (1…aantal_kolommen3) %}----{{ 100/aantal_kolommen3 | integer }}%------+|{% endfor %}+
|
|
|
|
|{% for directors in period.directors %}{% ic %}{% input directors.custom.show as:boolean %}{% endic %}{% ifi directors.custom.show == true %}{% if directors.custom.represented_by_name == blank %}{{directors.name}}{% else %}{{directors.name}}, vertegenwoordigd door haar vaste vertegenwoordiger, {{directors.custom.represented_by_name}}{% endif %}|{% assign modulo = forloop.index | modulo:3 %}{% if modulo == 0 %}{% unless forloop.last %}|
|
|
|
|{% endunless %}{% endif %}{% endifi %}{% endfor %}
|
|
{%endif %}""

This is what I have on the screen:

This is what I have in the preview:

The column width must be the same for the two names.

What do I need to change in the code to have a correct layout?

Thanks a lot,

Sylvie

Hi Sylvie,

The problem was that you were hiding the columns of the directors that were not ticked with the ifi statement. If you want to keep the same layout you can try the following on your table:


{% stripnewlines %}
|---{% for i in (1…aantal_kolommen3) %}----{{ 100/aantal_kolommen3 | integer }}%------|{% endfor %}+
{% newline %}
{% for directors in period.directors %}
  | {% ic %}{% input directors.custom.show as:boolean %}{% endic %}
  {% ifi directors.custom.show == true %}
    {% if directors.custom.represented_by_name == blank %}
      {{ directors.name }}
    {% else %}
      {{ directors.name }}, vertegenwoordigd door haar vaste vertegenwoordiger, {{directors.custom.represented_by_name}}
    {% endif %}
  {% endifi %}
  {% if forloop.index == 3 %}
    {% newline %}
  {% endif %}
{% endfor %}
{% endstripnewlines %}

Also remember to use stripnewlines and indent your code so that it’s easier to read.

Hope that works for you,
Borja

Hi Borja,

This is not totally the result I need.

This is what I have in the input screen with My code and your code:

This is what I have in preview:

I have a empty column for the name De Winne Raoul and this is not wat I want.

I need the two names next to each other (see the result with My code) with the same size for the two columns (what’s my problem).

How I can change my code to receive the correct result?

Thanks a lot,

Sylvie

Hi Sylvie,

I can see what you are trying to achieve. I modified the code and included a different column layout for input view and export view by enclosing them respectively between ic and nic tags. See if this works for you:

{% if period.directors.count > 1 %}De bestuurders:
{% assign columns3 = 3 %}
{% assign aantal_zaakvoerders3 = period.directors.count %}
{% if aantal_zaakvoerders3 > columns3 %}{% assign aantal_kolommen3 = columns3 %}{% else %}{% assign aantal_kolommen3 = aantal_zaakvoerders3 %}{% endif %}
{% comment %}To count the number of directors selected{% endcomment %}
{% assign selected_directors = 0 %}
{% for directors in period.directors %}
  {% if directors.custom.show == true %}
    {% assign selected_directors = selected_directors+1 %}
  {% endif %}
{% endfor %}
{% if selected_directors > columns3 %}{% assign number_of_columns = columns3 %}{% else %}{% assign number_of_columns = selected_directors %}{% endif %}


{% assign index = 0 %}

{% stripnewlines %}
{% ic %}
{% for item in (1..aantal_kolommen3) %}
  |---{{ 100/aantal_kolommen3 | integer }}%----
{% endfor %}
{% endic %}
{% nic %}
{% for item in (1..number_of_columns) %}
  |---{{ 100/number_of_columns | integer }}%----
{% endfor %}
{% endnic %}
+
{% newline %}
{% for directors in period.directors %}
  {% ifi directors.custom.show == true %}
    | {% ic %}{% input directors.custom.show as:boolean %}{% endic %}
    {% if directors.custom.represented_by_name == blank %}
      {{ directors.name }}
    {% else %}
      {{ directors.name }}, vertegenwoordigd door haar vaste vertegenwoordiger, {{directors.custom.represented_by_name}}
    {% endif %}
    {% assign index = index+1 %}
  {% endifi %}
  {% if index == 3 %}
    {% newline %}
  {% endif %}
{% endfor %}
{% endstripnewlines %}

{% endif %}

Best,
Borja