I prepared a reconciliation Template for capital grants which works well for the current period.
I will have to update it each period.
As I don’t want to re-enter each line every year, I would like to copy it in the new period and only modify some lines.
For a client, I tried to copy it to another period.
It did not work. But since I tried this the reconciliation is no more working in the previous period (error message:Liquid error: undefined method []’ for 0.6e5:BigDecimal|Liquid error: undefined method []’ for 0.6e5:BigDecimal)
How should I adapt my code to allow it to be used each year without deleting the previous period ?
My code is the following :
->DETAIL DES TRANSFERTS DE SUBSIDES AU RESULTAT<-
{% nic %}
{::group}
{:/group}
{% endnic %}
|:--------------|:------------|:-------------|
{%ic%}Sélection des comptes liés aux subsides en capital :{%endic%}|{% input custom[current_account.number].dette.account_15subside as:account_collection range:15 default:15%}{%ic%}#15 Subsides{%endic%}{%assign account_15subside=period.accounts.include_zeros|range:custom[current_account.number].dette.account_15subside%}|{% input custom[current_account.number].dette.account_16ID as:account_collection range:168 default:168%}{%ic%}#16 Impôts différés liés aux subsides{%endic%}{%assign account_16ID=period.accounts.include_zeros|range:custom[current_account.number].dette.account_16ID%}
|–10%–|:—+
|{%ic%}Subsides en capital :{%endic%}|{%if account_15subside.value=$1%}{%unexplained 0 as:indicator%}{%else%}{%unexplained account_15subside.value+$1 as:indicator%}{%endif%}|{%ic%}{{$1|currency}}{%endic%}|{%ic%}{{account_15subside.value|currency}}{%endic%}|{%ic%}{{account_15subside.value+$1|currency}}{%endic%}
Is it (with a workaround) possible to copy data to another period with the period.custom drop?
Removing period in period.custom did indeed the trick, but i my case there is already to many data that will be lost if period in period.custom will be removed.
As you’ve might’ve noticed, using the period. in an account or reconciliation template will cause the “copy data” function to not work at all.
So never use period.custom in those templates.
to get back to your question :
Is it (with a workaround) possible to copy data to another period with the period.custom drop?
Actually, there is.
You could create a text template where you have your period.custom drop but you’ll add a rollforward to it that will copy data from your period.custom to the new period custom drop.
The rollfoward is explained here:
Hope this helps and I’m not too theoretically - let me know if you are stuck and perhaps I can create a case for this as well