selected_accounts_and_reconciliation_texts

Root: export

This drop can only be used in the Detail text section within "Style settings".

Methods

MethodReturn typeDescription
accountsaccounts dropReturns an accounts drop with all the accounts selected on the export.
assetsarrayReturns only reconciliations and accounts of type "assets".
equityarrayReturns only reconciliations and accounts of type "equity".
empty?booleanReturns true if no accounts or reconciliations are selected.
expensesarrayReturns only reconciliations and accounts of type "expense".
incomesarrayReturns only reconciliations and accounts of type "income".
include_zerosarraySame as the 'include_zeros' method in accounts
is_accountbooleanReturns true if the selected item is an account.
liabilitiesarrayReturns only reconciliations and accounts of type "liabilities".
namestringReturns the account/reconciliation name.
p_and_larrayReturns only reconciliations and accounts of type "profit and loss".
reconciliation_textsarrayReturns a reconciliation drop with all the reconciliations selected on the export.
rendered_templatetemplatePrints the selected account/reconciliation template on the PDF export.
unreconciled_value
(accounts only)
decimalReturns the amount pending to be reconciled in the account template.
value
(accounts only)
decimalReturns the value of the selected account.

Example

The below code was entered in the "detail text" section within export. The script will print the information from all the selected accounts that are "liabilities":

{% for account_or_text in export.selected_accounts_and_reconciliation_texts.liabilities %}
  {% if account_or_text.is_account %}

    |------------|------15%------:+
    | {{ account_or_text.number }} {{ account_or_text.name }} | {{ account_or_text.value | currency }}
    
    {{ account_or_text.rendered_template }}
    
    |------------|------15%------:+
    |Difference | {{ account_or_text.unreconciled_value | currency }}
  
  {% endif %}
{% endfor %}
Output
18801880