consolidated_companies

This drop allow access to consolidation data in a multi-company file.

The consolidated_companies drop provides limited information from the consolidated companies.

Methods

Method

Return type

Description

file_code

string

The file number from the consolidated company settings.

name

string

The company name from the consolidated company settings.

period

drop

Period information from the consolidated company: accounts and adjustments. Limited to year_end_date.

join_date

date

Returns the date the company joined the consolidation, as specified in the "Consolidation" screen.

exit_date

date

Returns the date the company exited the consolidation, as specified in the "Consolidation" screen.

parent

boolean

Returns true if the company is selected as the Parent company in the Consolidation screen; otherwise returns false.

currency

string

Returns the currency as specified in the consolidated company settings.


Consolidated company period

MethodReturn typeDescription
accountsdropThe external company accounts information
adjustmentsadjustments dropThe external company adjustments attached to this period.

Consolidated company period accounts

MethodReturn typeDescription
namestringReturns the name of the first account in this drop.
return_values_in_millionsaccount dropThe values of the account drops in the created accounts drop will be shown in millions.
return_values_in_onesaccount dropThe values of the account drops in the created accounts drop will be shown in ones.
return_values_in_thousandsaccount 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.

Consolidated company period account

MethodReturn typeDescription
idintegerThe unique id for the account.
linkstring with linkThe number and name of the account with a link to the account itself.
namestringThe name of the account.
mapped_numberstringThe mapped account number.
numberstringThe number of the account defined in an account collection. Could be the original number or the mapped number, depending on the client's configuration.
original_namestringThe original name of the account (before mapping).
original_numberstringThe original number of the account (before mapping).
valuedecimalReturns the value of the account in the current period.

Consolidated company adjustments

MethodReturn typeDescription
countintegerReturns the amount of adjustment drops.
externalAdjustments dropReturns an adjustments drop with only the external adjustments.
firstAdjustment dropReturns the first adjustment drop of the adjustments drop.
internalAdjustments dropReturns an adjustments drop with only the internal adjustments.

Consolidated company adjustment

MethodReturn typeDescription
namestringName of the adjustment.
periodperiodThe period this adjustment is in.
transactionsarrayReturns an array of items with value description and account attributes.
numberintegerThe number of the adjustment (numbers of external and internal adjustments can overlap).
tagsarrayReturns an array of items with name attribute.
purposestringPurpose of the adjustment
external?booleanTrue when external, false when internal.
internal?booleanTrue when internal, false when external.
from_reverse?booleanTrue when this adjustment was created by reversing another adjustment.
from_forward?booleanTrue when this adjustment was created by forwarding another adjustment.
from_copy?booleanTrue when this adjustment was created by copying another adjustment.
forward_accountaccounts dropThe equity account that was used to do a roll forward.

Consolidated company transactions

Method

Return type

Description

value

decimal

Value of the transaction.

date

date

Booking date of the transaction.

relation

string

Name of the relation of the transaction.

account

accounts drop

Access the methods for accounts drops (eg. account.name, account.value) and get the information of the account related to the transaction.

eg. journal_id, journal_type, description

Other fields:
The transaction drop provides access to all fields that are stored for transactions. You can access fields other than date, relation or value by calling the name of the column on this drop. You can take the name that you see in Silverfin and replace spaces (' ') and points ('.') by underscores ('_').


Example 1

The list of companies included in the consolidation can be found under “Edit Client” → “Consolidation” tab. In this screen, users can add or remove companies and must select the parent company as well as the join and exit dates for each.

To print the details of each company:

{% for c in company.consolidated_companies %}

<table>
  <thead>
    <tr>
      <th class="usr-line-bottom"><b>Method</b></th>
      <th class="usr-line-bottom"><b>Output</b></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><b>name</b></td>
      <td>{{ c.name }}</td>
    </tr>
    <tr>
      <td><b>file_code</b></td>
      <td>{{ c.file_code }}</td>
    </tr>
    <tr>
      <td><b>join_date</b></td>
      <td>{{ c.join_date }}</td>
    </tr>
    <tr>
      <td><b>exit_date</b></td>
      <td>{{ c.exit_date }}</td>
    </tr>
    <tr>
      <td><b>parent</b></td>
      <td>{{ c.parent }}</td>
    </tr>
    <tr>
      <td><b>currency</b></td>
      <td>{{ c.currency }}</td>
    </tr>
  </tbody>
</table>

<br/>
{% endfor %}

Output:


Example 2

Accessing period data and adjustments of the parent company:

{% comment %}Assigning account and adjustment drops for the parent company's data.{% endcomment %}
{% for c in company.consolidated_companies %}
  {% if c.parent == true %}
    {% assign parent_company_name = c.parent_company.name  %}
    {% assign parent_company_accounts = c.period.accounts %}
    {% assign parent_company_adjustments = c.period.adjustments %}
    {% break %}
  {% endif %}
{% endfor %}

{% comment %}Display of the selected account for the parent company (shown in ones, with rounding differences applied).{% endcomment %}
{% assign parent_company_accounts = parent_company_accounts.return_values_in_ones | add_rounding_difference %}
{% assign accounts_range_4 = parent_company_accounts | range:'4' %}
Selected accounts of the parent company: {{ accounts_range_4 | currency, invert:true }}

{% comment %}Displaying adjustments for the parent company.{% endcomment %}
{% for adjustment in parent_company_adjustments %}
  {% if forloop.first %}
  <b><u>Parent company adjustments</u></b>
  {% endif %}
  Adjustment {{ adjustment.number }}
  {% for transaction in adjustment.transactions %}
    <b>Description:</b> {{ transaction.description }}
    <b>Account mapped number:</b> {{ transaction.account.mapped_number }}
    <b>Value:</b> {{ transaction.value | currency }}
  {% endfor %}
{% endfor %}

Output: