# Liquidatiereserve reconciliation

**URL:** <https://community.silverfin.com/t/liquidatiereserve-reconciliation/663>\
**Category:** Templates\
**Tags:** input, iterations, for\_loop\
**Created:** [February 20, 2018, 3:54pm UTC](https://community.silverfin.com/t/liquidatiereserve-reconciliation/663 "2018-02-20T15:54:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julie\_Vandekerckhove](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/julie_vandekerckhove/32/1071_2.png) [@Julie\_Vandekerckhove](https://community.silverfin.com/u/Julie_Vandekerckhove)\
**Post date:** [February 20, 2018, 3:54pm UTC](https://community.silverfin.com/t/liquidatiereserve-reconciliation/663/1 "2018-02-20T15:54:37Z")

</div>

Hi

For my reconciliation for the liquidation reserves i would like to ad some calculations per selected account.  
In the code you’ll see below all the variables have the same name so they keep overwriting each other.

_Beschikbare reserve_ {% input custom.reserves.accounts as:account\_collection range:13 accounts\_var:reserves %}

|—5%—|—5%-----|----15%--------|:----5%-------|------------7%-------|--------7%-----|–7%-----|-------7%--------|-----------------5%-----------------------|--------------5%------------|------------5%--------------------------------|----------------+{% for account in reserves %}  
|{% input custom.reserves.volgnummer %} |{{account.number}}|{{account.name}}|{% input custom.account.aanslagjaar %}|{% assign $1 = -1_account.value %}{{$1|currency}}|{% input custom.reserves.datumaanleg as:date %}|{% input  
custom.reserves.percentage as:select options:“17%|20%” %}|{{$1|currency}}|{{ $1 |currency}}|{% input custom.reserves.uitkerenvanaf as:date %}|{% assign $2 = $1_0.05 %}{{$2|currency}}| {% assign $3 = $1-$2 %}{{$3|currency}}{%endfor%}

I’m making a logical mistake somewhere but I can’t seem to figure out how to fix it (=

Regards,  
Julie

 ![liq%20res](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/f2ac81ef6bcbf3175ac3ef3c90f9a98a7ca1e8c6.PNG)

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [February 23, 2018, 9:19am UTC](https://community.silverfin.com/t/liquidatiereserve-reconciliation/663/2 "2018-02-23T09:19:25Z")

</div>

Hi @Julie_Vandekerckhove,

your code isn’t complete I’m afraid, so if it’s no problom, can you poste it again? Mind the format as well, so it’s more clear

Like this :

```auto
Beschikbare reserve {% input custom.reserves.accounts as:account_collection range:13 accounts_var:reserves %}

|—5%—|---5%-----|----15%--------|:----5%-------|------------7%-------|--------7%-----|–7%-----|-------7%--------|----5%-----|-----5%---|---5%-------|----------------+{% for account in reserves %}
|{% input custom.reserves.volgnummer %} |{{account.number}}|{{account.name}}|{% input custom.account.aanslagjaar %}|{% assign $1 = -1account.value %}{{$1|currency}}|{% input custom.reserves.datumaanleg as:date %}|{% input
custom.reserves.percentage as:select options:“17%|20%” %}|{{$1|currency}}|{{ $1 |currency}}|{% input custom.reserves.uitkerenvanaf as:date %}|{% assign $2 = $10.05 %}{{$2|currency}}| {% assign $3 = $1-$2 %}{{$3|currency}}{%endfor%} 

```

But I think I see what the issue; the thing is, for your custom input objects, you’ll need to link it to something unique in your custom collection.  
We allready know what that is: the account.number for instance.

So you’ll need to adapt your code the following :

```auto
Beschikbare reserve {% input custom.reserves.accounts as:account_collection range:13 accounts_var:reserves %}

|—5%—|---5%-----|----15%--------|:----5%-------|------------7%-------|--------7%-----|–7%-----|-------7%--------|-----------------5%-----------------------|--------------5%------------|------------5%--------------------------------|----------------+{% for account in reserves %}
|{% input custom[account.number].volgnummer %} |{{account.number}}|{{account.name}}|{% input custom[account.number].aanslagjaar %}|{% assign $1 = -1account.value %}{{$1|currency}}|{% input custom[account.number].datumaanleg as:date %}|{% input
custom[account.number].percentage as:select options:“17%|20%” %}|{{$1|currency}}|{{ $1 |currency}}|{% input custom[account.number].uitkerenvanaf as:date %}|{% assign $2 = $10.05 %}{{$2|currency}}| {% assign $3 = $1-$2 %}{{$3|currency}}{%endfor%}

```

Your issue was that your input custom object was the same for each iteration of the forloops, but by adding `[account.number]` into your custom obect, each custom object exists on its “own” (that is to say, it’s related for each account number, which are unique in your fori loop - you can’t have twice the same number. Account.name could be an option, as well [forloop.index0] or `keys` ).

But we’ll go with this; more obvious.

You’re good with this @Julie_Vandekerckhove ?

---

<div class="post-metadata">

**Author:** ![Julie\_Vandekerckhove](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/julie_vandekerckhove/32/1071_2.png) [@Julie\_Vandekerckhove](https://community.silverfin.com/u/Julie_Vandekerckhove)\
**Post date:** [February 23, 2018, 11:19am UTC](https://community.silverfin.com/t/liquidatiereserve-reconciliation/663/3 "2018-02-23T11:19:38Z")

</div>

> [@sven](#):
>
> count.number}}|{{account.name}}|{% input custom[account.number].aanslagjaar %}|{% ass

Thank you, this was what I needed 🙂

---

<div class="post-metadata">

**Author:** ![davyvdb](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@davyvdb](https://community.silverfin.com/u/davyvdb)\
**Post date:** [March 4, 2019, 9:25am UTC](https://community.silverfin.com/t/liquidatiereserve-reconciliation/663/4 "2019-03-04T09:25:47Z")

</div>

Hello

Would it be possible to post the latest code please? I’m just a beginner 😉

tnx in advance!
