Reconciliation with IF structure

Hi everyone

Merry Christmas & Happy 2021! While working the last days of 2020, I was making a new template and the reconciliation doesn’t match up…

What is my purpose? - Very shortly said- (it’s not the same, but the meaning is!)
If the turnover is bigger than the wage, that means the wage should be booked on the account.
I want the number of the wage to be reconciled.

If the wage is bigger than the turnover, that means the turnover should be booked on the account & then I want the number of the turnover to be reconciled.

I have tried about everything that I could find on this forum & the Silverfin knowledge base, but nothing does what I want it do…

Can anyone please help me out?? :blush:

Hi @Zena

From our side, we also wish you a very happy 2021 and happy holidays!

We tried to set up a little piece of code, where you can find the tools to play with reconciliation and booking on adjustments.

Hereby what we propose :

`{% stripnewlines %}
| Turnover
| Wages
| Difference
| Adjustment button
| Reco
{% newline %}
|--------
|--------
|--------
|--------
|--------
{% newline %}
| {% input custom.accounts.turnover as:account_collection range:"70" accounts_var:accounts_turnover %}
  {% =$0+ -1*accounts_turnover.value as:currency %}
| {% input custom.accounts.wages as:account_collection range:"618" accounts_var:accounts_wages %}
  {% =$1+ accounts_wages.value as:currency %}
| {% assign difference = $0-$1 %} {{ difference | currency }}
| {% unless $0 == $1 %}
    {% if $0 > $1 %}
      {% capture adj_txt %}{% t "Book on turnover account:" %}{% for account in accounts_turnover %}{{ account.number }} {% endfor %}{% endcapture %}
    {% else %}
      {% capture adj_txt %}{% t "Book on wages account:" %}{% for account in accounts_wages %}{{ account.number }} {% endfor %}{% endcapture %}
    {% endif %}
  {% adjustmentbutton text:adj_txt %}
  {% adjustmenttransaction original_account_number:counter_acc account_name:counter_name description:description value:counter_value %}{% endadjustmentbutton %} 
  {% endunless %}
{% endstripnewlines %}`

Here you can find the value of the turnover accounts, the wages accounts, the difference between them and the adjustment button.

Does these values guide you to the right reconciliations? If not, can you tell us what you are missing to do so?

Kind regards
Sofie

PS: you can find more info about this adjustment button here : CASE: automatically propose an adjustment

hey @Sofie_Cleemput1,

Est ce possible de comparer avec les chiffres de la période précédente?

Best regards

hi @THANAS

You can indeed compare the numbers of the previous period. This can be done as follow :

{{ period.minus_1p.accounts.70 }} or {{ period.minus_1p.accounts.618 }}

Kind regards
Sofie

hey @Sofie_Cleemput1,

Thank’s a lot.

Kind regards