Creating template vehicule fleet

@Andrew,

Could you post your updated code then? Because it was working in my file…

also, do you really mean to have this range : 243000,252300,6135,6403 ?
Don’t you mean you need range 24,25,61,64 but default accounts 243000,252300,6135,6403 should be selected?

Thanks

I just want the accounts related to the costs of vrachtwagen to be shown. Therefor I chose my range that way.

Below my code for the vrachtwagens now - thx in advance for your help.

|--------|----|----:+
|{% t “Overig rollend materieel” %} {% input custom.vrachtwagens.accounts as:account_collection range:243000,252300,6135,6403 accounts_var:accounts %}{% for account in accounts %}
| {% linkto account %}{{account.number}} {{account.name}}{% endlinkto %} | |{{account.value | currency }}{% $4+ account.value %}{% endfor %}
| | |{{ $4 | currency }}


| Datum | Omschrijving wagen | Chassisnummer | Nummerplaat | Brandstof | Verz.premie | VKB | Bedrag
|-----------10%---------------|--------10%-------|---------------15%-----------|-------------10%-----------|------------------------|------------10%-------------|-------10%------|–10%–:+{% fori vrachtwagen in custom.vrachtwagens %}
|{% input vrachtwagen.datum as:date %} |{% input vrachtwagen.type %} | {% input vrachtwagen.chassis %} | {% input vrachtwagen.nummerplaat %} | {% input vrachtwagen.brandstof as:select options:types options_values:“benzine|diesel|LPG|hybride|elektrisch” %} | {% $5+input vrachtwagen.verzekering as:currency %} | {% $6+input vrachtwagen.VKB as:currency %} | {% $7+input vrachtwagen.bedrag as:currency %}{% if forloop.last %}
| | | | | | {{$5 | currency}} |{{$6 | currency}} | {{$7 | currency}}{% endif %}{% endfori %}

|-----------------------|--------------:+
|Te verklaren verschil vrachtwagens| {% =unexplained $4-$5-$6-$7 | currency %}

@sven

Could you already have a look at my last question ? Thx !

Well @Andrew,

This really gave me a headache for half hour to be honest. But I’ve found it.

The issue is that you created your collection custom.vrachtwagens but also a variable that is automatically linked to it: custom.vrachtwagens.accounts

This cannot be done, because you don’t want to link those two. If you change one of those 2, for instance custom.vracht.accounts , it will work normal again (and faster too).

Hope this explanation helps?

I tested with this :

|--------|----|----:+
|{% t "Overig rollend materieel" %} {% input custom.vracht.accounts as:account_collection range:243000,252300,6135,6403 accounts_var:accounts %}{% for account in accounts %}
| {% linkto account %}{{account.number}} {{account.name}}{% endlinkto %} | |{{account.value | currency }}{% $4+ account.value %}{% endfor %}
| | |{{ $4 | currency }}



| Datum | Omschrijving wagen | Chassisnummer | Nummerplaat | Brandstof | Verz.premie | VKB | Bedrag 
|-----------10%---------------|--------10%-------|---------------15%-----------|-------------10%-----------|------------------------|------------10%-------------|-------10%------|--10%--:+{% fori vrachtwagen in custom.vrachtwagens %}
|{% input vrachtwagen.datum as:date %} |{% input vrachtwagen.type %} | {% input vrachtwagen.chassis %} | {% input vrachtwagen.nummerplaat %} | {% input vrachtwagen.brandstof as:select options:types options_values:"benzine|diesel|LPG|hybride|elektrisch" %} | {% $5+input vrachtwagen.verzekering as:currency %} | {% $6+input vrachtwagen.VKB as:currency %} | {% $7+input vrachtwagen.bedrag as:currency %}{% if forloop.last %}
| | | | | | {{$5 | currency}} |{{$6 | currency}} | {{$7 | currency}}{% endif %}{% endfori %}

|-----------------------|--------------:+
|Te verklaren verschil vrachtwagens| {% =unexplained $4-$5-$6-$7 | currency %}

@sven

It works !! Thx for your help !