CASE: Core rounding configuration

In Silverfin, there are different ways to round values in templates. Today, we are going to have a look at core rounding. The core rounding configuration is a functionality on the Silverfin platform that will make sure that rounding is driven from Silverfin core rather than being handled in the template set.

In practice, decimals will be removed from every amount for every single trial balance account. As a result of this, the sum of all balance sheet and profit and loss accounts will be out of balance. However, the rounding differences will be allocated to a specific BS and P&L account (see documentation on how to do this), so that the total trial balance balances back to 0.

Note that the functionality has to be activated, and the two rounding accounts have to be set up before this can be used. Once this is done, the rounding should be added per template by adding an additional liquid filter (add_rounding_difference) to an account collection. The reason for this, is that we do not want to add rounding in every single template, so there is still some flexibility.

Let’s have a look at an example:

In this block of code, we create an account collection of all the accounts within range β€˜10’. Next, we loop through this collection, and print the account name and account value for every item. At the bottom, we then print the total value for the selected range.

{% assign account_collection = period.accounts.return_values_in_ones | range:'10' %}
<table>
  <thead>
    <tr>
      <th><b>Account name</b></th>
      <th><b>Account value</b></th>
    </tr>
  </thead>
  <tbody>
    {% for account in account_collection %}
      <tr>
        <td>{{ account.name }}</td>
        <td>{{ account.value | currency }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>

Total value for range 10: {{ account_collection | currency }}

This will give the following output:

image (1)

Now, we will do something similar, but this time, we will include the add_rounding_difference filter to the account collection.

{% assign account_collection_rounded = period.accounts.return_values_in_ones | range:'10' | add_rounding_difference %}
<table>
  <thead>
    <tr>
      <th><b>Account name</b></th>
      <th><b>Account value</b></th>
    </tr>
  </thead>
  <tbody>
    {% for account in account_collection_rounded %}
      <tr>
        <td>{{ account.name }}</td>
        <td>{{ account.value | currency }}</td>
      </tr>
    {% endfor %}
  </tbody>
</table>

Total value for range 10: {{ account_collection_rounded | currency }}

Which will give the following output:

image (2)

At first sight, there is not much of a difference between the two situations. However, notice the slight difference in account value for the Sales of goods account (and of the total value). The value has decreased by 25 after adding the filter. This might seem odd at first, but it becomes clear what is happening by adding the following lines to the code:

Rounding difference:  period.accounts.return_values_in_ones.p_and_l_rounding_difference 
Account where difference is allocated:  period.accounts.p_and_l_rounding_account.number }} - {{ period.accounts.p_and_l_rounding_account.name 

This gives us the following information:

image (3)

It seems that the sum of all the decimals of the P&L accounts (which have now been rounded) is exactly -25. The output also shows us that the selected rounding account is 10.01.00 - Sales of goods. So the rounding difference has been allocated to that specific account, explaining the difference that we had in our example from above.

The example is now referring to the income statement accounts, but the logic is almost exactly the same for the balance sheet accounts. The only difference is that there, we should use the methods bs_rounding_difference and bs_rounding_account to extract information about the rounding set up.

Drop a comment below if you have any questions!

1 Like