am trying to create a template for the vehicule fleet. At the moment we are keeping all the data about company cars in an Excel sheet (date of purchase, description car, amount, licence plate, user, CO², fuel, mileage…)
It would be nice if we could create a template in Siverfin where we could keep all these data and create a ‘toelichting’ where there is eventually a reconcillation with accountnumbers 241XXX and 243000.
Could their be an input how to create such a template ? I’ve tried to set up one but it’s to difficult for me to create such template.
I think the first step would be to look at our existing “reconciliation” ( = toelichting) templates, and see how they are configured.
The template you are trying to create, looks something that can be handled in Silverfin, with all inputs fields and of course, a check with the value of the related accounts.
For now, only the slides of “Workshop 1 - let’s get technical” are downloadable in the community but that’s more a focus on text templates and how drops and variables are configured in Silverfin… However, it’s not a bad idea to look into this and try to create this template as a text template first?
Also, each quarter we give workshops (workshop 1 - let’s get technical and workshop 2 - let’s get more technical) to give people like yourself a basic training of Liquid, our programming code we use.
Next week, the slides for workshop 2 (which has a focus on account and reconciliation templates) will also be available in the community.
This looks like an interesting case though, to share with the community
So if you start creating this template, let us know where you are stuck, and step by step, we can give you guidelines to create what you want.
Hope you are up for it?
I read this and started programming, because I think this is a good idea
At the moment this is my code, but when I export this, there is no data shown:
Your code is fine, but the as:tekst is wrong. Should be {% input custom.detail.typewagen as:text %} . It’s not even necessary to define as:text (try just like this : {% input custom.detail.typewagen %} ).
Let me quickly address how a fori-loop works (later this week, I’ll post a more detailed explanation in templates - cases).
A fori-loop is used to create a “collection” of data, for instance your ‘custom.wagens’. The only way to fill that collection with variables like ‘bestuurder’, ‘datum’, … is to use the fori.
Meaning this :
{% fori x in custom.wagens %} .... {% endfori %}
The x is just the link between the variables you are gonna create, and the collection. And that can be called anything.
So if I want to fill my collection with variables like ‘bestuurder’ and ‘datum’, the fori-loop will be like this :
{% input wagen.bestuurder %}{% input wagen.datum as:date %}
{% endfori %}````
See what was wrong in your code? You didn't have a link between your variables and your collection.
Can you try to update your code now?
Later this week I'll update a more detailled explanation for a fori-loop, but I hope this will do for now...
@Fiduciaire.Eulaers: indeed, always close your fori-loop after the last piece of code you have in the fori-loop (don’t use a new line, because that will cause a wierd display of the table).
To divide the text of the table on the width of the page: just add a ‘+’ to the line that defines the table.
So
|------------|-------------|
will create just 2 columns, and the columns adjust to the largest word in each column.
But if you use this :
|-------|---------+
it will spread the colums over the whole width of the page. Just by adding a ‘+’ instead of a pipe |
I created following template. I’m having problems with the account-range of the ‘vrachtwagens’. When I write somehting in ‘Datum’ and want go further to ‘omschrijving wagen’ by using the shift-key, my account range changes by it self to all the accounts that i’m having in table. With the ‘personenwagens’ i’m not having that problem, using the same script.
I could understand the logic behind it, but the behavior it displays after you ‘tab’ the first input and it shows all accounts, is strange. Even more wierd, is that it doesn’t happen for ‘personenwagens’.
You could try following code, where we don’t filter on period.accounts with our custom variable :
This will fix it. Because you don’t use any default accounts (only a range, but maybe that is your purpose perhaps?), what this code does, is create a collection of data named “accounts”. That collection is filled with every account you select through # (so through custom.vrachtwagens.accounts basically).
But, if you really want to upgrade your code and work with a default accounts that are already selected, then the code will have to be something else. But for now, I’ll leave it like that (it’s harder to explain - I don’t mind doing so, but I want to write it down somewhere as a case. Hopefully I can do that later this week, and I don’t want to confuse you now).