Total number of share

Hi

I want to calculate the total number of shares, but only if the type of share is Volle eigendom or Naakte eigendom.


I’ve tried with the code below, but this is not working.

{% for shareholder in period.shareholders%}{% $0+ shareholder.amount_of_shares %}{% endfor %}
|Totaal aantal aandelen
|{% if shareholder.custom.kind_of_shares == “Volle eigendom” or shareholder.custom.kind_of_shares == “Naakte eigendom” %}{{ $0 | integer }}{% endif %}

Hi Sylvia,

You could do the following:

{% for shareholder in period.shareholders%}
{% if shareholder.custom.kind_of_shares == “Volle eigendom” or shareholder.custom.kind_of_shares == “Naakte eigendom” %}
{% $0+ shareholder.amount_of_shares %}
{% endif %}
{% endfor %}
|Totaal aantal aandelen
|{{ $0 | integer }}

Let me know if that works.

Best,
Borja

Hi Borja
Yes, this seems to work
Thx!

Borja

Apparently in some files, the type of shares is blank, so I added or shareholder.custom.kind_of_shares == " ", but then I don’t get a total.

{% for shareholder in period.shareholders%}
{% if shareholder.custom.kind_of_shares == “Volle eigendom” or shareholder.custom.kind_of_shares == “Naakte eigendom” or shareholder.custom.kind_of_shares == “Nue-propriété” or shareholder.custom.kind_of_shares == “Pleine propriété” or shareholder.custom.kind_of_shares == " " %}
{% $0+ shareholder.amount_of_shares %}
{% endif %}
{% endfor %}

Hi Sylvia,

It should be:

or shareholder.custom.kind_of_shares ==  blank

Best,
Borja