Hi,
We currently have a convoluted way of exporting our cashflow for our clients. Whereby we have a template in the workflow which links to a report. The report is then where the export originally comes from.
To streamline our process, we are wanting to do away with the report and only use the template from the workflow.
I know how to add the previous year in, however I am struggling to get the template to use the data from the previous year, in particular the figures where we have overtyped them.
We would like to add in the rollforward option so that when completing the 2023 accounts, we can rollforward the previous year’s so that it will appear in the 2022 column.
The code we currently use is below, this is before putting in the 2022 column as well:
Main:
{% assign row_title = “Profit/(loss) for the financial period” %}
{% capture key_name %}profit_loss_for_the_financial_year{% endcapture %}
{% assign lay_out = “Automatic_negative” %}
{% assign mapping_range = “4__8,900__930” %}
{% include “parts/layout” %}
Part:
{% when ‘Automatic_negative’ %}
{% assign row_title_key = key_name %}
{% unless key_name == ‘profit_loss_for_the_financial_year’ %}
{% assign current_value = period_acc_curr | range:mapping_range %}
{% assign current_opening_value = period_opening_cy | range:mapping_range %}
{% assign cy_value = current_value-current_opening_value %}
{% else %}
{% assign cy_value = period_acc_curr | range:mapping_range %}
{% assign cy_value = cy_value-rounding2 %}
{% endunless %}
{% assign cy_value = cy_value | currency:0, invert:true %}
{% if cy_value == 0 or cy_value == blank %}
{% assign cy_value_zero = 1 %}
{% else %}
{% assign cy_value_zero = 0 %}
{% endif %}
{% if cy_value_zero != 1 %}
{% capture row_name %}{% if row_title contains “Decrease/(increase)” %}{% comment %}assets{% endcomment %}{% if cy_value < 0 %}(Increase){% else %}Decrease{% endif %}{% endif %}{% if row_title contains “Increase/(decrease)” %}{% comment %}liabilities{% endcomment %}{% if cy_value < 0 %}(Decrease){% else %}Increase{% endif %}{% endif %}{% if row_title contains “Profit/(loss)” %}{% if cy_value < 0 %}(Loss){% else %}Profit{% endif %}{% endif %}{{ row_title | replace:“Decrease/(increase)”,“” | replace:“Increase/(decrease)”,“” | replace:“Profit/(loss)”,“” }}{% endcapture %}
|{% input custom.[row_title_key].name | default:row_name %}
|{% input custom.[row_title_key].value_cy as:currency precision:0 default:cy_value assign:cy_value %}
{% $1+ cy_value %}
{% newline %}
{% endif %}
I have tried to update and put the rollforward in, but this was coming up with a custom drop error.
Please can someone help with this?
Thanks,
Rory