Template overview investement deduction

Hi all, we are currently developing a new template in Silverfin to provide an overview of the investments listed in annex 275U.
For each investment, we want to display:

  • The acquisition value
  • The applicable investment deduction percentage
  • The calculated amount of the investment deduction

I’ve already created a code that lists the investments and their acquisition values. However, I’m not sure how to include the deduction percentage and the calculated amount for each investment.

Below is the code I have created so far:

´´´
{% assign bereik = period.accounts | range: “21,22,23,24”%}
Nieuwe investeringen - Investeringsaftrek
{% for account in bereik %}
{% for detail in account.details %}
{% if detail.custom.investment_deduction == true%}
{{detail.date }} - {{ detail.custom.title }} - {{ detail.custom.value |currency }} - {{ detail.type_investment_inputs }}
{%endif%}
{% endfor %}
{% endfor %}‘’’

I’d appreciate any examples, ideas, or best practices to help move this forward. Thanks in advance!

Hi @Cathy and welcome to the Silverfin Developer Community!

I’ve passed your question along to the team maintaining this specific template and they will get back to you here with some guidance.

Kind regards
Romy

Hi @Cathy,

Apologies for the delayed response!

Below is an updated version of your existing code with a few enhancements:

  • Refined the bereik range syntax
  • Added a bordered table for improved readability
  • Included a conditional check: {% if account.results.type == "investment_deduction" %}
{% assign bereik = period.accounts | range:"21__24" %}

<table class="usr-width-100 usr-bordered">
  <thead>
    <tr>
      <th class="usr-width-25">Date</th>
      <th class="usr-width-25">Title</th>
      <th class="usr-width-25">Amount</th>
      <th class="usr-width-25">Type of investment</th>
    </tr>
  </thead>

  <tbody>
    {% for account in bereik %}
      {% if account.results.type == "investment_deduction" %}
        {% assign details = account.details %}
        {% for detail in details %}
          <tr>
            <td>{{ detail.date }}</td>
            <td>{{ detail.title }}</td>
            <td>{{ detail.value |currency }}</td>
            <td>{{ detail.type_investment }}</td>
          </tr>
        {% endfor %}
      {% endif %}
    {% endfor %}
  </tbody>
</table>

Adding the deduction percentage and calculated amount is trickier, since those are calculated in the 275 U template.

Are you still planning to build this custom template?

Kind regards,
Benjamin