Problem with custom themes

Since today I was using the following Custom Them:

<table style="padding: 30px">
    <thead>
        <tr>
            <td colspan="99">
                <table style="margin-bottom: 20px; width: 100%"><tr>
                    <td style="font-weight: bold; font-size: 32px; vertical-align: top">{{ title }}</td>
                    {% if business.logo != null %}<td style="text-align: end"><img src="{{ business.logo }}" style="max-height: 150px; max-width: 300px; display: inline" /></td>{% endif %}
                </tr></table>
                
                <table style="margin-bottom: 20px; width: 100%"><tr>
                     <td style="vertical-align: top">
                        <div><b>{{ recipient.name }}</b></div>
                            <div>{{ recipient.address | newline_to_br }}</div>
                            {% comment %} ***************** <div>{{ recipient.identifier }}</div> ***************** {% endcomment %}
                            <div><b>ΑΦΜ {{ recipient.code }}</b></div>
                            {% comment %} ***************** <div>{{ custom_fields["ΑΦΜ"] }} </div> ***************** {% endcomment %}
                    </td>
                        <td style="border-right-width: 1px; padding-right: 20px; text-align: right">
                            {% for field in fields %}
                            {% if field.label == 'Από' or field.label == 'From' or field.label == 'Τοποθεσία Αποθήκης' or field.label == 'Inventory location'%}{% continue %}{% endif %}
                            <div style="font-weight: bold">{{ field.label }}</div>
                            <div style="margin-bottom: 10px">{{ field.text }}</div>
                            {% endfor %}
                        </td>
                        {% if business.address != null %}
                            <td style="padding-left: 20px; width: 1px; white-space: nowrap">
                            <div style="font-weight: bold">{{ business.name }}</div>
                            <div>{{ business.address | newline_to_br }}</div>
                            {% for field in business.custom_fields %}
                                <div>{{ field.label }} {{ field.text }}</div>
                            {% endfor %}
                            </td>
                        {% endif %}
                    </tr></table>

                    <div style="font-size: 14px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; padding: 5px 10px; text-align: center; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px; width: 1px">#</td>
                {% for column in table.columns %}            
                <td style="font-weight: bold; padding: 5px 10px; text-align: {{ column.align }}; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
                {% endfor %}
            </tr>
        </thead>
        <tbody>
            <tfoot>
                <tr><td colspan="99" style="text-align: right"><!--Page Counter--></td></tr>
            </tfoot>
            {% for row in table.rows %}
            <tr>
                <td style="padding: 5px 10px; text-align: center; border-left-width: 1px; width: 1px">{{ forloop.index0 | plus:1 }}</td>
                {% for cell in row.cells %}
                <td style="padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ cell.text | newline_to_br }}</td>
                {% endfor %}
            </tr>
            {% endfor %}
            <tr>
            <td style="border-bottom-width: 1px; border-left-width: 1px">&nbsp;</td>
            {% for column in table.columns %}            
                <td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}">&nbsp;</td>
            {% endfor %}
            </tr>
            {% for total in table.totals %}
            <tr>
                <td colspan="{{ table.columns | size }}" style="padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
                <td style="border-left-width: 1px; white-space: nowrap; border-right-width: 1px; border-bottom-width: 1px; padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
            </tr>
            {% endfor %}

            {% for field in custom_fields %}
            <tr>
                <td colspan="99">
                    <div style="font-weight: bold; padding-top: 20px">{{ field.label }}</div>
                    <div>{{ field.text | newline_to_br }}</div>
                </td>
            </tr>
            {% endfor %}

            {% if emphasis.text != null and emphasis.positive %}
            <tr><td colspan="99"><div style="text-align: center; margin-top: 40px"><span style="color: #006400; border-width: 5px; border-color: #006400; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div></td></tr>
            {% endif %}

            {% if emphasis.text != null and emphasis.negative %}
            <tr><td colspan="99"><div style="text-align: center; margin-top: 40px"><span style="color: #FF0000; border-width: 5px; border-color: #FF0000; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div></td></tr>
            {% endif %}
                
        </tbody>
    </table>

Today I am receiving the following in Sale Invoice

Anybody any idea?

1 Like

what if you changed this to this:

{{ forloop.index }}