Is it possible to select a car that is inserted in the template Wagenpark in an other template?
if this is selected, is it also possible to give the correct %VU verworpen, like in template “VU autokosten” or “Voordelen van alle aard”
case:
I would like to create a template “beroepsverplaatsingen” for “eenmanszaken” that calculates the fiscal % and also calculates a proffesional %.
It is possible to loop over all cars in the fleet template, like this:
{% for car in period.reconciliations.wagenpark.custom.fleet %}
Taxyear 2021 starting on 01/01/2020 or later:
{% capture car_disallowed %}car_disallowed_{{ car.key }}{% endcapture %}
The disallowed % is: {{ period.reconciliations.wagenpark.results.[car_disallowed] }}
{% endfor %}
In all other cases, before TY2021, it works a bit different because for those tax years there are fixed ranges of disallowed percentages: 10, 20, 25, 30, 40 and 50%. All cars with a specific % are put into one result tag that you can use as a collection to loop over them, e.g. for 50%:
{% assign cars_at_50 = period.reconciliations.wagenpark.results.cars_at_50 | split:"," %}
{% for car in cars_at_50 %}
{{ car }} {% comment %}car is here combination of brandtype and license plate {% endcomment %}
{% endfor %}
Is it also possible to loop over resulttag “Car_total_fleet”?
I tried this similar like code mentioned above but it didn’t work.
Is it also possible to loop over the name of the car? (“wagen” or “merk en type”)
Goal is to create a table like this:
Wagen | totale kost wagen | % privé beperking | kost wagen na privé beperking | %fiscale beperking | kost wagen na Fiscale beperking
{% for car in period.reconciliations.wagenpark.custom.fleet %}
{{ car.brand_type }}
{% endfor %}
To loop over results you first need to be sure how they are called. You can find it in the code or using debug mode. To access the result and its workings I refer you to our documentation.
Yellow is data from wagenpark.
Collum “Wagen” a select options, so only the ‘personenwagens’ can be selected.
further more, if a car is bought before 01/01/2018 then an if statement should be made
if “datum aankoop” is before 01/01/2018 then %aftrekbaar = 75%
The code snippet combined with the car information below is displaying the information in the template for me, could you check if this is working for you as well?
Is it possible that instead of the percentage in the column “BEROEPSBEPERKING” we can put a number and add a column just after which divides the amount of the column “Brutobedrag” by the number of the column “BEROPSBEPERKING”?
Is it possible that the amount in the “Brutobedrag” column can be changed? In Fleet template, we added an account that we do not want to include in our table here
You can change the input type of {% input custom.percentageberoepPW.percentage as:percentage %} from percentage to integer or currency to add a number instead of a percentage.
You can add this new column by adjusting the numbers of pipes in the headers, table definition & inside {% for car in period.reconciliations.wagenpark.custom.fleet %}, where you can then print the calculated amount of Brutobedrag/Beroepsbeperking
You can change the amount of the “Brutobedrag” by deducting the amount(s) of the accounts you don’t want to include from the original “Brutobedrag”.
If you need help on some specific parts in the code while making these adjustments, don’t hesitate to ask!