accounts
Methods and examples for working with the accounts drop in Silverfin Liquid templates.
Methods
Method | Return type | Description |
|---|---|---|
starred assets liabilities revenues expenses income equity | Filters the accounts and returns a new accounts drop with only these accounts. | |
count | integer | the amount of account drops in the accounts drop. |
credit_value | decimal | The sum of all credit values for all accounts in this accounts drop for this period. |
debit_value | decimal | The sum of all debit values for all accounts in this accounts drop for this period. |
details (deprecated) | details drop | A details drop of all details of all selected accounts. |
first | returns the first account drop of the accounts drop. | |
include_zeros | By default an accounts drop doesn't include accounts with a zero balance. Calling include_zeros returns an accounts drop that includes all accounts. | |
include_zeros_with_details | include_zeros_with_details will return all accounts with a balance other than 0 AND accounts with 0 balance IF those accounts contain any information (corrections , attachments or texts). Accounts that have no data at all will not be included unlike include_zeros. | |
name | string | Returns the name of the first account in this drop. |
opening_value | decimal | The sum of all opening values for all accounts in this accounts drop for this period. |
p_and_l_rounding_difference | decimal | When using the core rounding functionality, these methods will display the exact rounding difference. |
p_and_l_rounding_account | Returns the account drop where the rounding difference is stored. | |
return_values_in_millions | The values of the account drops in the created accounts drop will be shown in millions. | |
return_values_in_ones | The values of the account drops in the created accounts drop will be shown in ones. | |
return_values_in_thousands | The values of the account drops in the created accounts drop will be shown in thousands. | |
value | decimal | The sum of all values for all accounts in this accounts drop for this period. |
Starred, assets, liabilities, revenues, expenses, income, equity
Create accounts drop with group of accounts:
{% for account in period.accounts.expenses %}
{{ account.number }}
{{ account.asset_or_expense }}
{{ account.id }}
...
{% endfor %}
Create string with group of accounts:
{{ period.accounts.expenses | map:"number" | join:"," }}Create accounts drop with group of accounts: 61120 true 19327110 61140 true 19327111 … Create string with group of accounts: 61120,61140,61300,61320,61321,61520,618001,618002,61810,61900,61910,61920,61930,61940,63000,65900,694000
count, credit value, debit value
Show sum of all requested accounts:
{{ period.accounts.count }}
{{ period.accounts.credit_value }}
{{ period.accounts.debit_value }}
Show all requested accounts separately :
{% for account in period.accounts %}
{{ account.credit_value }}
{% endfor %}Show sum of all requested accounts: Count : 34 Credit value : -1328589.47 Debit value : 1328589.47 Show value of the requested accounts separately : -18600.0 -500.0 -1000.0
Return values in thousands, return_values_in_ones, return_values_in_thousands
{% capture header %}|-----|-----|-----:{% newline %}{% endcapture %}
{% assign accounts = #619 %}
{% stripnewlines %}
{{ header }}
{% for account in accounts.return_values_in_millions %}
|{{ account.number }}
|{{ account.name }}
|{{ account.value | currency }}{% newline %}
{% endfor %}
{{ header }}
{% for account in accounts.return_values_in_ones %}
|{{ account.number }}
|{{ account.name }}
|{{ account.value | currency }}{% newline %}
{% endfor %}
{{ header }}
{% for account in accounts.return_values_in_thousands %}
|{{ account.number }}
|{{ account.name }}
|{{ account.value | currency }}{% newline %}
{% endfor %}
{% endstripnewlines %}Special method: range
It's possible to add any given range of account numbers to created a new accounts drop with only those accounts.
For example:
period.accounts.6 will return an accounts drop with only the accounts that have an account number starting with a 6
Rounding difference and account
Show rounding difference:
Rounding difference P&L: {{ period.accounts.p_and_l_rounding_difference }}
Rounding difference BS: {{ period.accounts.bs_rounding_difference }}
Show rounding account:
P&L rounding difference account: {{ period.accounts.p_and_l_rounding_account.number }}
BS rounding difference account: {{ period.accounts.bs_rounding_account.number }}include_zeros_with_details
here is an example on the difference between a simple account drop and include_zeros_with_detailsdrop:
---- account drop ----
{% assign accounts = #WBed %}
{% for account in accounts.return_values_in_ones %}
{{ account.number }}
{{ account.name }}
{{ account.value | currency }}
{% endfor %}
---- account drop include_zeros_with_details ----
{% assign accounts_test_two = period.accounts.WBed.include_zeros_with_details %}
{% for account in accounts_test_two.return_values_in_ones %}
{{ account.number }}
{{ account.name }}
{{ account.value | currency }}
{% endfor %}—-account drop—- WBedVkkRea Reclame- en advertentiekosten 65,000.00 —-account drop include_zeros_with_details—- WBedAeaNot Notariskosten 0.00 WBedAutBra Brandstofkosten auto's 0.00 WBedVkkRea Reclame- en advertentiekosten 65,000.00
account WBedAeaNot has no text nor value in account detail template, however it has an attachment, so it is included in this drop.
account WBedAutBra has no value nor attachment in account detail template, however it has text in extra information, so it is included in this drop.
account WBedAutOpa has no text, no attachment, no value, therefore it is not included in this drop. It would be included however in include_zeros drop.
Updated 9 days ago
