Field zaakvoerder.custom.represented_by_name

Dear All,

I’ve got a problem with my own template ‘Verslag algemene vergadering’.
We made in our ‘Bedrijfsparameters’ a Bureau where you select the President and secretary for the genaral meeting.

Every worked fine, until I encounterted the problem of Permanent representatives.

I’ve foud the field zaakvoerder.custom.represented_by_name but don’t know how its filed with data.
Can someone help me.

thanks in advance.
Sven

Hello @Sven.G,

The field zaakvoerder.custom.represented_by_name is filled either manually or synced with AdminConsult.

Not sure if this helps you any further? If not, can you explain the problem in more detail? If you can, post perhaps the relevant code that is giving issues.

Thanks.

Hi @sven

Hereby my code.

# Samenstelling van het bureau

Voorzitter : {%input company.custom.av.aanhefvoorzitter as:select options:‘De heer|Mevrouw’%} {% input company.custom.av.voorzitter as:select options:zaakvoerder_av_options %} {{zaakvoerder.custom.represented_by_name}}
{% if zaakvoerder.custom.represented_by_name != blank %}
{{ zaakvoerder.custom.represented_by_name }}{% endif %}{% if zaakvoerder.custom.represented_by_vat != blank %}
{{ zaakvoerder.custom.represented_by_vat }}{% endif %}

Stemopnemer : {%input company.custom.av.aanhefstemopnemer as:select options:‘De heer|Mevrouw’%} {% input company.custom.av.stemopnemer as:select options:shareholder_av_options %}
Secretaris: {%input company.custom.av.aanhefsecretaris as:select options:‘De heer|Mevrouw’%} {% input company.custom.av.secretaris as:select options:shareholder_av_optionss %}
Stemopnemer en secretaris : {%input company.custom.av.aanhefstemsec as:select options:‘De heer|Mevrouw’%} {% input company.custom.av.stemsec as:select options:shareholder_av_options %}

We want to select a ‘voorzitter’, but when it’s a rep, i want to select the rep.

Your quotes around the options are wrong; you need to use ’ instead of ‘ (you’ll see that the options will appear in blue in our editor). @Sven.G

So like this :

Voorzitter : {% input company.custom.av.aanhefvoorzitter as:select options:'De heer|Mevrouw'%} {% input company.custom.av.voorzitter as:select options:zaakvoerder_av_options %} {{zaakvoerder.custom.represented_by_name}}
{% if zaakvoerder.custom.represented_by_name != blank %}
{{ zaakvoerder.custom.represented_by_name }}{% endif %}{% if zaakvoerder.custom.represented_by_vat != blank %}
{{ zaakvoerder.custom.represented_by_vat }}{% endif %}

Stemopnemer : {%input company.custom.av.aanhefstemopnemer as:select options:'De heer|Mevrouw'%} {% input company.custom.av.stemopnemer as:select options:shareholder_av_options %}
Secretaris: {%input company.custom.av.aanhefsecretaris as:select options:'De heer|Mevrouw'%} {% input company.custom.av.secretaris as:select options:shareholder_av_optionss %}
Stemopnemer en secretaris : {%input company.custom.av.aanhefstemsec as:select options:'De heer|Mevrouw'%} {% input company.custom.av.stemsec as:select options:shareholder_av_options %}

But that’s not the cause of your issue (just noticed it).

How are the other options made by the way? For instance zaakvoerder_av_options ; can you post the relevant code of that?

So if you have a “rep” (stemopnemer), then you want to select one of those; if not, you want to select “voorzitter” right?

Still gonna need to know how all those av_options are created …

Hi @sven

{% capture company_form %}{{ company.company_form | replace: '.','' | replace: ' ','' | upcase }}{% endcapture %}
{% case company_form %}
{% when 'NV' or 'CVBA' or 'VZW' %}{% assign director_type = 'bestuurders' %}
{% else %}
  {% if period.directors.count == 1 %}
    {% assign director_type = 'zaakvoerder' %}
  {% else %}
    {% assign director_type = 'zaakvoerders' %}
  {% endif %}
{% endcase %}

{% capture zaakvoerder_av_options %}{% for zaakvoerder in period.directors %}{{ zaakvoerder.name }}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}
{% capture shareholder_av_options %}{% for shareholder in period.shareholders %}{{ shareholder.name }}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

# Algemene bedrijfsgegevens:

* Bedrijfsnaam: {{company.name}} 
* Vennootschapsvorm: {{company.company_form}}
* Adres: {{company.street}}, {{company.city}}
* O.N. nummer: {{company.vat_identifier}}
* RPR: {% input company.custom.rpr.name %}

---

|Naam | {% if director_type == 'bestuurders' %}Bestuurder{% else %}Zaakvoerder{% endif %} | Aandeelhouder | {% if director_type == 'bestuurders' %}Gedelegeerd{% else %}Statutair{% endif %} | Aantal aandelen | Aantal stemmen | Begin mandaat | Eind mandaat 
|----|----|----|----|----:|----:|---|----:+{% fori person in period.people %}
|{% input person.name %}    |{% nic %}{% if person.director == true %}x{% endif %}{% endnic %}{% input person.director as:boolean %} |{% nic %}{% if person.shareholder == true %}x{% endif %}{% endnic %}{% input person.shareholder as:boolean %} | {% nic %}{% if person.statutory == true %}x{% endif %}{% endnic %}{% input person.statutory as:boolean %} | {% input person.amount_of_shares as:integer %}  | {% input person.amount_of_votes as:integer %}| {% input person.director_start_date as:date %}  | {% input person.director_end_date as:date %} 
|{% input person.address_1 placeholder:'Straat+nr' %}
|{% input person.address_2 placeholder:'Postcode+stad' %}{% ifi person.custom.represented_by_name != blank %}
|{% input person.custom.represented_by_name placeholder:'Vertegenwoordiger' %}{% endifi %}{% ifi person.custom.represented_by_vat != blank %}
|{% input person.custom.represented_by_vat placeholder:'Btw-nr vertegenwoordiger' %}{% endifi %}{% endfori %}

---

# Algemene Vergadering
* Datum jaarvergadering: {% input period.custom.av.datum as:date %}
* Uur: {% input period.custom.av.uur as:select options:'7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23' %}:{% input period.custom.av.minuten as:select options:'00|15|30|45' %}
* Plaats: {% input period.custom.av.plaats default:'de maatschappelijke zetel' %}

---

# Samenstelling van het bureau
Voorzitter : {% input company.custom.av.aanhefvoorzitter as:select options:'De heer|Mevrouw'%} {% input company.custom.av.voorzitter as:select options:zaakvoerder_av_options %} {{zaakvoerder.custom.represented_by_name}}
{% if zaakvoerder.custom.represented_by_name != blank %}
{{ zaakvoerder.custom.represented_by_name }}{% endif %}{% if zaakvoerder.custom.represented_by_vat != blank %}
{{ zaakvoerder.custom.represented_by_vat }}{% endif %}

Stemopnemer : {%input company.custom.av.aanhefstemopnemer as:select options:'De heer|Mevrouw'%} {% input company.custom.av.stemopnemer as:select options:shareholder_av_options %} 
Secretaris: {%input company.custom.av.aanhefsecretaris as:select options:'De heer|Mevrouw'%} {% input company.custom.av.secretaris as:select options:shareholder_av_optionss %} 
Stemopnemer en secretaris : {%input company.custom.av.aanhefstemsec as:select options:'De heer|Mevrouw'%}  {% input company.custom.av.stemsec as:select options:shareholder_av_options %}

Okay @Sven.G how silly of me that I didn’t understand this right away :face_with_raised_eyebrow:

first of all, we need to create a collection that is gonna display the name of a director OR the name of the representative of that director.

You already have define your collection perfectly, but I would do it like this :

{% capture zkv_av_options %}{% for zkv in period.directors %}{% if zkv.custom.represented_by_name != blank %}{{ zkv.custom.represented_by_name }}{% else %}{{ zkv.name }}{% endif %}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

See what we do there by adding an if-statement? As soon as a representative name was given (so NOT blank), it will be saved. If it is blank, the name of the director is then saved.

Hope this helps you forward; keep up the good work @Sven.G :+1:

Hi @sven

I understand the code, but it does not show anything.

I’ve seen you put zkv.custom.represented_by_name and not zaakvoerder.
If i’m looking in my code, I don’t see the field, but the field person.custom.represented_by_name.

so I thought to call this by using {{person.custom.represented_by_name}}

Greets
Sven

I used ‘zkv’ as a link between my objects and the collection that holds those objection. Doesn’t matter what you use as a link, as long as you use it in the whole loop.

Just change the code to this :

{% capture zaakvoerder_av_options %}{% for zaakvoerder in period.directors %}{% if zaakvoerder.custom.represented_by_name != blank %}{{ zaakvoerder.custom.represented_by_name }}{% else %}{{ zaakvoerder.name }}{% endif %}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

to be more in line with your own code.

Should work though; could you check again @Sven.G ?

Hi @sven

I’ve done this

{% capture zaakvoerder_av_options %}{% for zaakvoerder in period.directors %}{% if zaakvoerder.custom.represented_by_name != blank %} {{ zaakvoerder.name }} vertegenwoordigd door {{ zaakvoerder.custom.represented_by_name }}{% else %}{{ zaakvoerder.name }}{% endif %}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

and it works.

Splendid :ok_hand: @Sven.G

@sven,

Problem, I can see it, but can save it :slight_smile:

I was to quick

Post me the whole code again @Sven.G ? Bc you should be able to save it

{% capture company_form %}{{ company.company_form | replace: '.','' | replace: ' ','' | upcase }}{% endcapture %}
{% case company_form %}
{% when 'NV' or 'CVBA' or 'VZW' %}{% assign director_type = 'bestuurders' %}
{% else %}
  {% if period.directors.count == 1 %}
    {% assign director_type = 'zaakvoerder' %}
  {% else %}
    {% assign director_type = 'zaakvoerders' %}
  {% endif %}
{% endcase %}

{% capture zaakvoerder_av_options %}{% for zaakvoerder in period.directors %}{% if zaakvoerder.custom.represented_by_name != blank %} {{ zaakvoerder.name }} vertegenwoordigd door {{ zaakvoerder.custom.represented_by_name }}{% else %}{{ zaakvoerder.name }}{% endif %}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}
{% capture shareholder_av_options %}{% for shareholder in period.shareholders %}{{ shareholder.name }}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

# Algemene bedrijfsgegevens:

* Bedrijfsnaam: {{company.name}} 
* Vennootschapsvorm: {{company.company_form}}
* Adres: {{company.street}}, {{company.city}}
* O.N. nummer: {{company.vat_identifier}}
* RPR: {% input company.custom.rpr.name %}

---

|Naam | {% if director_type == 'bestuurders' %}Bestuurder{% else %}Zaakvoerder{% endif %} | Aandeelhouder | {% if director_type == 'bestuurders' %}Gedelegeerd{% else %}Statutair{% endif %} | Aantal aandelen | Aantal stemmen | Begin mandaat | Eind mandaat 
|----|----|----|----|----:|----:|---|----:+{% fori person in period.people %}
|{% input person.name %}    |{% nic %}{% if person.director == true %}x{% endif %}{% endnic %}{% input person.director as:boolean %} |{% nic %}{% if person.shareholder == true %}x{% endif %}{% endnic %}{% input person.shareholder as:boolean %} | {% nic %}{% if person.statutory == true %}x{% endif %}{% endnic %}{% input person.statutory as:boolean %} | {% input person.amount_of_shares as:integer %}  | {% input person.amount_of_votes as:integer %}| {% input person.director_start_date as:date %}  | {% input person.director_end_date as:date %} 
|{% input person.address_1 placeholder:'Straat+nr' %}
|{% input person.address_2 placeholder:'Postcode+stad' %}{% ifi person.custom.represented_by_name != blank %}
|{% input person.custom.represented_by_name placeholder:'Vertegenwoordiger' %}{% endifi %}{% ifi person.custom.represented_by_vat != blank %}
|{% input person.custom.represented_by_vat placeholder:'Btw-nr vertegenwoordiger' %}{% endifi %}{% endfori %}

---

# Algemene Vergadering
* Datum jaarvergadering: {% input period.custom.av.datum as:date %}
* Uur: {% input period.custom.av.uur as:select options:'7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23' %}:{% input period.custom.av.minuten as:select options:'00|15|30|45' %}
* Plaats: {% input period.custom.av.plaats default:'de maatschappelijke zetel' %}

---

# Samenstelling van het bureau
Voorzitter : {% input company.custom.av.aanhefvoorzitter as:select options:'De heer|Mevrouw'%} {% input company.custom.av.voorzitter as:select options:zaakvoerder_av_options %} 
Stemopnemer : {%input company.custom.av.aanhefstemopnemer as:select options:'De heer|Mevrouw'%} {% input company.custom.av.stemopnemer as:select options:shareholder_av_options %} 
Secretaris: {%input company.custom.av.aanhefsecretaris as:select options:'De heer|Mevrouw'%} {% input company.custom.av.secretaris as:select options:shareholder_av_optionss %} 
Stemopnemer en secretaris : {%input company.custom.av.aanhefstemsec as:select options:'De heer|Mevrouw'%}  {% input company.custom.av.stemsec as:select options:shareholder_av_options %}

You had a space in your capture of zaakvoerder_av_options :

{% capture zaakvoerder_av_options %}{% for zaakvoerder in period.directors %}{% if zaakvoerder.custom.represented_by_name != blank %} {{ zaakvoerder.name }} vertegenwoordigd door {{ zaakvoerder.custom.represented_by_name }}{% else %}{{ zaakvoerder.name }}{% endif %}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

Needs to be :

{% capture zaakvoerder_av_options %}{% for zaakvoerder in period.directors %}{% if zaakvoerder.custom.represented_by_name != blank %}{{ zaakvoerder.name }} vertegenwoordigd door {{ zaakvoerder.custom.represented_by_name }}{% else %}{{ zaakvoerder.name }}{% endif %}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

The space probably breaks the options, and makes sense.

If you would add this: options:“test|testing” you too wouldn’t write options:" test| testing"

Think you good to go now with this @Sven.G
Don’t hesitate to ask us, if you’re stuck