Hi,
I’ve been doing my best to correct the coding for a table I’m working on, but I must have a slight error with the coding for the total line as I’m struggling to find a workaround.
Currently when I enter data into the template, rather than providing a new line below the first, it creates a new set of columns to the right of the data, so the table is expanding horizontally rather than vertically.
Here is the code:
|Item
|Description
|Value
|Attachment
{% newline %}
|----30%-----
|----30%-----
|----20%-----:
|:----20%-----:#
{% newline %}
{% fori item in custom.petty_cash_details %}
|{% input item.title as:text placeholder:'Title' %}
|{%=$1+input item.text as:text placeholder:'Extra info' %}
|{%=$2+input item.value as:currency placeholder:0 %}
|{%=$3+input item.doc as:file_collection %}
{% assign total_amount = total_amount+item.value %}
{% endfori %}
{% comment %}<-Table_total->{% endcomment %}
{% newline %}
|
|
|{% if current_account.asset_or_expense %}
{% unless decimal_recon == true %}
{% assign difference = INT($1+account.value+total_amount) %}
{% else %}
{% assign difference = $1+account.value+total_amount %}
{% endunless %}
{% else %}
{% unless decimal_recon == true %}
{% assign difference = INT($1+account.value-total_amount) %}
{% else %}
{% assign difference = ($1+account.value-total_amount) %}
{% endunless %}{% endif %}
{% capture recon_text %}
Account value: {{ $1+account.value | currency:0 }} <br>
Template value: {{ total_amount | currency:0 }} <br>
Difference: {{ difference | currency:0 }}
{% endcapture %}
{% unreconciled difference as:indicator unreconciled_text:recon_text %} **{{ total_amount | currency }}**
|
{% endstripnewlines %}
Here is the template without any data:
Here is the template after entering a value:
Apologies if this is a simple fix, but I would be grateful for some guidance!
Many thanks,
Mike