I would like to show the Invoice number before the Invoice date. how can i change this position please.
You can achieve that by running fields
loop twice. Once to find Invoice Number
and skip everything else, then show everything else except for Invoice Number
.
So the code like this:
{% for field in fields %}
<div style="font-weight: bold">{{ field.label }}</div>
<div style="margin-bottom: 10px">{{ field.text }}</div>
{% endfor %}
would turn into:
{% for field in fields %}
{% if (field.label != 'Invoice number') %}{% continue %}{% endif %}
<div style="font-weight: bold">{{ field.label }}</div>
<div style="margin-bottom: 10px">{{ field.text }}</div>
{% endfor %}
{% for field in fields %}
{% if (field.label == 'Invoice number') %}{% continue %}{% endif %}
<div style="font-weight: bold">{{ field.label }}</div>
<div style="margin-bottom: 10px">{{ field.text }}</div>
{% endfor %}
1 Like
Thanks thats brill just what i was looking for.
I tried this code, tot use for custom fields. But i didn’t get it work. I think the references i used aren’t wright.
1 Like