Signature not visible in export

I did some changes in our tekst after the update of the bedrijfsparameters but now the signature of the voorzitter isn’t showing in the export. It looks fine in the preview.

Code:

De agenda afgehandeld zijnde wordt de vergadering gesloten om {% if period.custom.artikels.uitstel == "true" %}{{ tijdstip_uitstel_einde }} {% else %} {{ tijdstip_einde }} {% endif %} nadat alle aanwezigen kennis hebben genomen van onderhavige notulen en verklaren in te stemmen met de inhoud en de bewoordingen ervan.

{% stripnewlines %}
{% newline %}
  {% newline %}
  {% newline %}
  {% newline %}
  {% newline %}
{% newline %}
{% for person in period.people %}
  {% if person.name.key+0 == voorzitter+0 %}
    {% signmarker name:person.name %}<br><br><br>{{ person.name }}
    {% if person.custom.represented_by_name != blank %}
      <br>met als vaste vertegenwoordiger {{ person.custom.represented_by_name }}
    {% endif %}
  {% endif %}
{% endfor %}<br>Voorzitter
{% endstripnewlines %}

<br>

{:/group}```

Hi Lesly,

Could please post the code where you assign the variable ‘voorzitter’ ?

Thanks,
Borja

Same as the standard Silverfin template

{% if period.custom.voorzitter.andere_dan_zkv == blank %}
{% assign voorzitter = period.custom.voorzitter.naam %}
{% else %}
{% assign voorzitter = period.custom.voorzitter.andere_dan_zkv %}
{% endif %}

Hello @Lesly,

I’m afraid that is not enough, but I’ll explain what we do in our template:

{% if period.custom.voorzitter.andere_dan_zkv == blank %}
  {% assign voorzitter_av = period.custom.voorzitter.naam %}  {% comment %}is done bc we work with a default value{% endcomment %}
{% else %}
  {% assign voorzitter_av = period.custom.voorzitter.andere_dan_zkv %}
{% endif %} 

We assign the value (which isn’t the name itself, but rather the option value that has been linked to the database variable (period.custom.voorzitter.naam OR period.custom.voorzitter.andere_dan_zkv). That option value is actually the “id” which can be linked to every person from the drop people.

After this, we will loop through all persons again:

{% for person in period.people %}
{% comment %}it is the db var "represented_by_name" that decides if a person is legal or not - needed for default dropdown LEGAL OR NOT{% endcomment %}
{% assign default_type = "" %}
{% if person.custom.represented_by_name != blank %}
  {% assign default_type = "legal" %}
{% else %}
  {% assign default_type = "nature" %}
{% endif %}
{% comment %}look at the dropdown to check whether someone is LEGAL or not{% endcomment %}
{% assign type = person.custom.type | default:default_type %} 

  {% if INT(person.id) == INT(voorzitter_av) %}
    {% assign current_voorzitter = "" %}
    {% assign words = person.name | split: ' ' %}
    {% assign lastname = "" %}
    {% assign person_first_name = "" %}
    {% 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 %}
    {% if type == "legal" %}
      {% assign current_voorzitter = person.name %}
    {% else %}
      {% if person.custom.first_name == blank and person.custom.last_name == blank %}
        {% assign current_voorzitter = person.name %}
      {% elsif person.custom.first_name == blank and person.custom.last_name != blank %}
        {% assign current_voorzitter = current_voorzitter | append:person_first_name | append:" " | append:person.custom.last_name %}
      {% elsif person.custom.first_name != blank and person.custom.last_name == blank %}
        {% assign current_voorzitter = current_voorzitter | append:person.custom.first_name | append:" " | append:lastname %}
      {% else %}
        {% assign current_voorzitter = current_voorzitter | append:person.custom.first_name | append:" " | append:person.custom.last_name %}
      {% endif %}
    {% endif %}  
    {% if type == "legal" %}
    {% case person.custom.company_form %}
      {% when 1 %}{% assign legal_type = 'SCE' %}
      {% when 2 %}{% assign legal_type = 'OFP' %}
      {% when 6 %}{% assign legal_type = 'CVOA' %}
      {% when 8 %}{% assign legal_type = 'CVBA' %}
      {% when 11 %}{% assign legal_type = 'VOF' %}
      {% when 12 %}{% assign legal_type = 'CV' %}
      {% when 13 %}{% assign legal_type = 'COMMVA' %}
      {% when 14 %}{% assign legal_type = 'NV' %}
      {% when 15 %}{% assign legal_type = 'BVBA' %}
      {% when 21 %}{% assign legal_type = 'OVM' %}
      {% when 17 %}{% assign legal_type = 'VZW' %}
      {% when 27 %}{% assign legal_type = 'SE' %}
      {% when 18 %}{% assign legal_type = 'ION' %}
      {% when 30 %}{% assign legal_type = 'Buitenlandse onderneming' %}
      {% when 60 %}{% assign legal_type = 'ESV' %}
      {% when 23 %}{% assign legal_type = 'Buitenlandse privaatrechtelijke vereniging met vestiging, agentschappen, kantoor of bijhuis in België' %}
      {% when 65 %}{% assign legal_type = 'EESV' %}
      {% when 26 %}{% assign legal_type = 'PRIV ST' %}
      {% when 265 %}{% assign legal_type = 'Europees economisch samenwerkingsverband zonder zetel met vestiging in België' %}
      {% when 506 %}{% assign legal_type = 'CVOA SO' %}
      {% when 29 %}{% assign legal_type = 'SON' %}
      {% when 508 %}{% assign legal_type = 'CVBA SO' %}
      {% when 511 %}{% assign legal_type = 'VOF SO' %}
      {% when 512 %}{% assign legal_type = 'GCV SO' %}
      {% when 513 %}{% assign legal_type = 'CVA SO' %}
      {% when 121 %}{% assign legal_type = 'Onderlinge verzekeringsmaatschappij, van publiek recht' %}
      {% when 514 %}{% assign legal_type = 'NV SO' %}
      {% when 125 %}{% assign legal_type = 'IVZW' %}
      {% when 510 %}{% assign legal_type = 'BVBA SO' %}
      {% when 560 %}{% assign legal_type = 'ESV SO' %}
    {% endcase %}
    {% assign current_voorzitter = current_voorzitter | append:" " | append:legal_type %}
    {% assign words = person.custom.represented_by_name | split: ' ' %}
    {% assign lastname = "" %}
    {% for word in words %}
      {% if forloop.last %} {% comment %}correct for syncs like adminis{% endcomment %}
        {% assign represented_by_first_name = word %}
      {% else %}
      {% assign lastname = lastname | append:" " | append:word %}
      {% endif %}
    {% endfor %}
    {% capture represented_by_last_name %}{{ lastname | strip }}{% endcapture %}
    {% if type == "legal" %}
       {% if person.custom.represented_by_name != blank %}
        {% capture representative %}met als vaste vertegenwoordiger {{ person.custom.represented_by_name }}{% endcapture %}
      {% endif %}
    {% endif %}
    {% assign current_voorzitter = current_voorzitter | append:" " | append:representative %}
    {% endif %}
    {% break %}
  {% endif %}
{% endfor %} 

but it is this statement:

{% if INT(person.id) == INT(voorzitter_av) %} that will be important to indicate who the “voorzitter” is.

So if a person from the drop people has the same ID as the local var voorzitter_av , we will assign values (like firstname, lastname, …) to another local var called current_voorzitter

And this is (in short) how you create the current president of the General Assembly meeting.

Let me know if this helps @Lesly

Hi @sven,

I didn’t have the time to check this code. We don’t use those legal types. But I wanted to let you know that this problem is solved with the update of the disappearing text on exports.

Lesly

Great to hear @Lesly, thanks for the update!