Hi there,
I made a copy of the Silverfintemplate ‘Eigen vermogen’ because I didn’t want a detail of all the transactions of the Equity in the export so I inserted {% ic % } and {% endic %} a few times. When I export this template the total is 0,00.
This is the code I adjusted:
|{% input custom.accounts.range as:account_collection range:10,11,12,13,14,15 default:10,11,12,13,14,15 accounts_var:accounts%}{% assign accounts = accounts.include_zeros %}| {% ic %} {% t "Datum" %} {% endic %} {% for account in accounts %}|{% linkto account %}{% ic %}{{account.number}}{% endic %}{% endlinkto %}<br>{{account.name}}{% endfor %}{% if liqres %}|<br>{% t "Liquidatiereserve" %} {% input custom.accounts.liquidatiereserve as:account_collection range:13 placeholder:t_liq %}{% endif %}| {% t "Totaal" %}
|---|------{% for account in accounts %}|------:{% endfor %}{% if liqres %}|---------:{% endif %}|-----:+{% fori l in lijnen %}{% assign $0 = 0 %} {% ic %}
|{% input l.omschrijving %} {% input l.doc as:file size:mini %}|{% input l.datum as:date %}{% for account in accounts %}{% assign account_number = account.number | replace:".","_" %}|{%$0+input l[account_number] as:currency placeholder:"" %}{% endfor %}{% if liqres %}|{%$0+input l["liqres"] as:currency placeholder:"" %}{% endif %}|{%=$1+ $0 %} {% endic %} {% endfori %}
| **{% t "Totaal eigen vermogen" %}** | {% for account in accounts %}{% assign account_number = account.number | replace:".","_" %}{% assign $0 = 0 %}|{% for l in lijnen %}{%$0+ l[account_number] %} {% endfor %}{% unexplained account.value+$0 as:indicator %} **{{ $0 | currency }}**{% assign $0 = 0 %}{% endfor %}{% if liqres %}{% assign $0 = 0 %}|{% for l in lijnen %}{%$0+ l["liqres"] %}{% endfor %}{% unexplained liq_accounts.value+$0 as:indicator %} **{{ $0 | currency }}**{% endif %}| **{{ $1 | currency }}**{% ic %}
| {% t "Boekhouding" %} | {% for account in accounts %}|{%=$20+ -1*account.value %}{% endfor %}{% if liqres %}|{%=$20+ -1*liq_accounts %}{% endif %}|{{ $20 | currency }}{% endic %}
Kind regards,
Cedric
Hi Cedric,
The problem is that the assignment of the values for $0 and $1 takes place between {% ic %} tags so when in export those values are 0. You can try the following code where the values are assigned outside:
|{% input custom.accounts.range as:account_collection range:10,11,12,13,14,15 default:10,11,12,13,14,15 accounts_var:accounts%}{% assign accounts = accounts.include_zeros %}| {% ic %} {% t "Datum" %} {% endic %} {% for account in accounts %}|{% linkto account %}{% ic %}{{account.number}}{% endic %}{% endlinkto %}<br>{{account.name}}{% endfor %}{% if liqres %}|<br>{% t "Liquidatiereserve" %} {% input custom.accounts.liquidatiereserve as:account_collection range:10 placeholder:t_liq %}{% endif %}| {% t "Totaal" %}
|---|------{% for account in accounts %}|------:{% endfor %}{% if liqres %}|---------:{% endif %}|-----:+{% fori l in lijnen %}{% assign $0 = 0 %} {% ic %}
|{% input l.omschrijving %} {% input l.doc as:file size:mini %}|{% input l.datum as:date %}{% endic %}{% for account in accounts %}{% assign account_number = account.number | replace:".","_" %}{% ic %}|{% input l[account_number] as:currency placeholder:"" %}{% endic %} {% assign $0 = $0+l[account_number] %} {% endfor %}{% if liqres %}{% ic %}|{% input l["liqres"] as:currency placeholder:"" %}{% endic %}{% assign $0 = $0+l["liqres"]%}{% endif %}|{% ic %}{{ $0 }}{% endic %}{% assign $1 = $1+$0 %}{% endfori %}
| **{% t "Totaal eigen vermogen" %}** | {% for account in accounts %}{% assign account_number = account.number | replace:".","_" %}{% assign $0 = 0 %}|{% for l in lijnen %}{%$0+ l[account_number] %} {% endfor %}{% unexplained account.value+$0 as:indicator %} **{{ $0 | currency }}**{% assign $0 = 0 %}{% endfor %}{% if liqres %}{% assign $0 = 0 %}|{% for l in lijnen %}{%$0+ l["liqres"] %}{% endfor %}{% unexplained liq_accounts.value+$0 as:indicator %} **{{ $0 | currency }}**{% endif %}| **{{ $1 | currency }}**{% ic %}
| {% t "Boekhouding" %} | {% for account in accounts %}|{%=$20+ -1*account.value %}{% endfor %}{% if liqres %}|{%=$20+ -1*liq_accounts %}{% endif %}|{{ $20 | currency }}{% endic %}
Hope that helps,
Best,
Borja
1 Like