Variables used in account entry template

Hi,

Could you please inform us how to get the variables for the below fields used in the Account Entry template (account number detail page):

Hi @Abo,

A bit difficult to determine which template you are referring to based on the print screen. But I assume it concerns the account template Standard template (Default)?

Also, can you detail your question a bit more? Do you want to collect the inputted data in this template? As the data is stored in the account details drop, you can access this by calling on this drop. More information you can find here: CASE: access data stored in account details.

The name of the specific input fields (assuming it concerns the Standard template (Default) are: detail.custom.title, detail.custom.text, detail.custom.doc and detail.custom.value.

Good luck!

Do not hesitate to contact us in case this is not the answer you were looking for!

Kind regards,
Robin

Hi,

It doesn’t work. In fact, if you click on the account number on the Account Template you get into the detail page of the account number (that was the screenshot). We want to get those fields.

See the code below, everything works except the detail.custom fields:

{% for account in period.accounts.20__27 %}


{{ account.number }} {{ account.original_number }} {{ account.name }} {{ account.value |currency }}


{{ detail.custom.title }} {{ detail.custom.text }} : € {{ detail.custom.value | currency }} ({{ detail.custom.date | date:"%d-%m-%Y" }})


{{ account.link }}
{{ account.id }}


{{ account.results.transactions.value }}
{{ detail.custom.invoice_number }}
{% endfor %}

Hi @Abo,

I have reworked your code a bit, is this what you were looking for:

{% for account in period.accounts.20__27 %}

{{ account.number }} {{ account.original_number }} {{ account.name }} {{ account.value |currency }}

{% assign current_account = period.accounts | range:account.number %}
{% for detail in current_account.details %}
{{ detail.custom.title }} {{ detail.custom.text }} : € {{ detail.custom.value | currency }} ({{ detail.custom.date | date:"%d-%m-%Y" }}) {{ detail.custom.invoice_number }}
{% endfor %}

{{ account.link }}
{{ account.id }}

{{ account.results.transactions.value }}

{% endfor %}

We loop through all 20__27 accounts and within the loop we loop through the current_account.details of every account number in the 20__27 collection.

Note that the custom drops detail.custom.date and detail.custom.invoice_number are not included in the Standard template (Default) so these will be empty, unless another account template is used that does include those fields of course.

Hope this is clear!

Kind regards,
Robin

Hi Robin,

Yes !

Thank you.

Hi Robin,

In fact could you also provide these fields:

Doubtful Debtors:

Disalowed Expenses:

Also another question, how to use an if to check what template has been chosen for that account number:

  • Account Template or Doubtful Debtors or Disallowed Expenses

Hi @Abo,

For doubtful debtors:
Column doubtful debtor: detail.custom.title
Column beginning balance: detail.custom.ver_beginsaldo
Column ending balance: detail.custom.ver_beginsaldo-detail.custom.ver_vermindering+detail.custom.ver_verhoging (not an input, but sum of inputs)
Column att.: detail.custom.doc

For disallowed expenses:
Column item: detail.custom.title
Column description: detail.custom.text
Column value: detail.custom.value

If you require any more variable names, note that you can access the code yourself in your template collection for all Silverfin standard templates.

For the doubtful debtors and disallowed expense template we have foreseen result-tags that help to indicate which account template is used (for disallowed expenses disallowed_template and for doubtful debtors: type). So in your loop you can check which of the results is not blank.

Good luck!

Kind regards,
Robin

Hi Robin,

Could you please give an example with the handle to be used please.
So to check for a certain account which template has been chosen (so, default account template or disallowed expenses or doubtful debtors.

Thx

Hi,
I did not receive any reply yet.
Regards

Hi Abo,

Let’s say the account you want to check is 201030.000, then what you need to do to find out what template is using is the following:

For disallowed expenses:

{% if period.accounts.['201030.000'].first.results.disallowed_template == 'disallowed_template' %}content{% endif %}

For doubtful debtors:

{% if period.accounts.['201030.000'].first.results.type == 'doubtful_debtors' %}content{% endif %}

Hope that clarifies your query,

Best,
Borja