accounts

Methods and examples for working with the accounts drop in Silverfin Liquid templates.

Methods

MethodReturn typeDescription
starred
assets
liabilities
revenues
expenses
income
equity
accounts dropFilters the accounts and returns a new accounts drop with only these accounts.
countintegerthe amount of account drops in the accounts drop.
credit_valuedecimalThe sum of all credit values for all accounts in this accounts drop for this period.
debit_valuedecimalThe sum of all debit values for all accounts in this accounts drop for this period.
details (deprecated)details dropA details drop of all details of all selected accounts.
firstaccount dropreturns the first account drop of the accounts drop.
include_zerosaccounts dropBy 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_detailsaccounts dropinclude_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.
namestringReturns the name of the first account in this drop.
opening_valuedecimalThe sum of all opening values for all accounts in this accounts drop for this period.
p_and_l_rounding_difference
bs_rounding_difference
decimalWhen using the core rounding functionality, these methods will display the exact rounding difference.
p_and_l_rounding_account
bs_rounding_account
accounts dropReturns the account drop where the rounding difference is stored.
return_values_in_millionsaccounts dropThe values of the account drops in the created accounts drop will be shown in millions.
return_values_in_onesaccounts dropThe values of the account drops in the created accounts drop will be shown in ones.
return_values_in_thousandsaccounts dropThe values of the account drops in the created accounts drop will be shown in thousands.
valuedecimalThe 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:"," }}
Output
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 %}
Output
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 %}

Output
—-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.