CASE: indicate template if reconciled or not

When building a template like this, we would like to visually guide the user on to what reconcile specifically:

Code used in above example:

{% ic %}
{::infotext}
{% t "Reconcile all income accounts that impacted the VAT declaration during the book year" %}
{:/infotext}
{% endic %}

{% input custom.income.range as:account_collection range:"7" default:"70" accounts_var:income %}

{% stripnewlines %}
|----90%----
|-----------:+
{% for acc in income %}
  {% newline %}
    | {{ acc.link }}
    | {{ -acc.value | currency }}
    {% if forloop.last %}
      {% newline %}
        | 
        |_^ {{ -income.value | currency }}  ^_
    {% endif %}
{% endfor %}
{% endstripnewlines %}

<br>

{% stripnewlines %}
|----70%----
|----20%----
|----10%----:+
{% fori inv in custom.vat_extra_info %}
  {% newline %}
    | {% input inv.description placeholder:"Description" %}
    | {% input inv.vat_declaration as:file_collection %}
    | {% $1+input inv.value as:currency %}
{% endfori %}
{% endstripnewlines %}

{% stripnewlines %}
|----:+
{% newline %}
| _{% t "Difference:" %}_
{% newline %}
| {{ -income.value-$1 | currency }}
{% endstripnewlines %}


This is a pretty standard example, where it’s obvious on what has to be reconciled. But if it’s not obvious at all (f.i. we calculate different numbers that should be compared to another amount), then it’s better to visually show which number is not correct, and which number(s) haven an impact on being unreconciled or not.
In above example we already see a green dot, however, our details are not 100% correct (because there’s a difference between the two numbers). How can we add a check flow that indicates whether or not something is unreconciled?

Using the unreconciled tag:

By using the unreconciled tag, you can impact the workflow of a template.
Here’s how:

{% comment %}unreconiled{% endcomment %}
{% unreconciled -income.value-$1 %} 

In the unexplained tag we use a formula that needs to be calculated; if the formula is zero, your template will future a green dot. If it’s not zero, it’ll be a red triangle (unless you specify the template it shouldn’t have a reconciliation necessary:
17

So whenever the formula -income.value-$1 is zero, my recon template will be reconciled (= green dot). If not, it’s unreconciled (= red triangle).

Perhaps we want a little more clarity on what’s need to be reconciled. How can we indicate what needs to be zero precisely?

Using the unreconciled tag with an indicator:

If you change your unreconciled statement into this:

{% unreconciled -income.value-$1 as:indicator %} 

it’ll check if the formula is zero or not. Depending on the outcome of the formula, it will show a red triangle or green dot inside the recon template:
23
or
39

You can add as many indicators as you want: if all 100 indicators are green except for one, your recon template will be seen as unreconciled (=red triangle). So all indicator tags should have zero as output in order to future a reconciled recon template:

This is the complete code, where normally the unreconciled tag can be placed anywhere (to be sure, place it anywhere outside logic statements!) :

{% ic %}
{::infotext}
{% t "Reconcile all income accounts that impacted the VAT declaration during the book year" %}
{:/infotext}
{% endic %}

{% input custom.income.range as:account_collection range:"7" default:"70" accounts_var:income %}

{% stripnewlines %}
|----90%----
|-----------:+
{% for acc in income %}
  {% newline %}
    | {{ acc.link }}
    | {{ -acc.value | currency }}
    {% if forloop.last %}
      {% newline %}
        | 
        |_^ {{ -income.value | currency }}  ^_
    {% endif %}
{% endfor %}
{% endstripnewlines %}

<br>

{% stripnewlines %}
|----70%----
|----20%----
|----10%----:+
{% fori inv in custom.vat_extra_info %}
  {% newline %}
    | {% input inv.description placeholder:"Description" %}
    | {% input inv.vat_declaration as:file_collection %}
    | {% $1+input inv.value as:currency %}
{% endfori %}
{% endstripnewlines %}

{% stripnewlines %}
|----:+
{% newline %}
| _{% t "Difference:" %}_
{% newline %}
| {% comment %}unreconiled{% endcomment %}
  {% unreconciled -income.value-$1 %}
  {{ -income.value-$1 | currency }}
{% endstripnewlines %} 

The code where the indicator is used (placed before or after the reconciled number):

{% ic %}
{::infotext}
{% t "Reconcile all income accounts that impacted the VAT declaration during the book year" %}
{:/infotext}
{% endic %}

{% input custom.income.range as:account_collection range:"7" default:"70" accounts_var:income %}

{% stripnewlines %}
|----90%----
|-----------:+
{% for acc in income %}
  {% newline %}
    | {{ acc.link }}
    | {{ -acc.value | currency }}
    {% if forloop.last %}
      {% newline %}
        | 
        |_^ {{ -income.value | currency }}  ^_
    {% endif %}
{% endfor %}
{% endstripnewlines %}

<br>

{% stripnewlines %}
|----70%----
|----20%----
|----10%----:+
{% fori inv in custom.vat_extra_info %}
  {% newline %}
    | {% input inv.description placeholder:"Description" %}
    | {% input inv.vat_declaration as:file_collection %}
    | {% $1+input inv.value as:currency %}
{% endfori %}
{% endstripnewlines %}

{% stripnewlines %}
|----:+
{% newline %}
| _{% t "Difference:" %}_
{% newline %}
| {% comment %}unreconiled{% endcomment %}
  {% unreconciled -income.value-$1 as:indicator %}
  {{ -income.value-$1 | currency }}
{% endstripnewlines %}