Manager.io incremental counter for product row

Created Diff never expires
1 removal
74 lines
5 additions
79 lines
<table style="padding: 30px">
<table style="padding: 30px">
<thead>
<thead>
<tr>
<tr>
<td colspan="99">
<td colspan="99">
<table style="margin-bottom: 20px"><tr>
<table style="margin-bottom: 20px"><tr>
<td style="font-weight: bold; font-size: 32px">{{ title }}</td>
<td style="font-weight: bold; font-size: 32px">{{ title }}</td>
{% if business.logo != null %}<td style="text-align: right"><img src="{{ business.logo }}" style="max-height: 150px; max-width: 300px" /></td>{% endif %}
{% if business.logo != null %}<td style="text-align: right"><img src="{{ business.logo }}" style="max-height: 150px; max-width: 300px" /></td>{% endif %}
</tr></table>
</tr></table>


<table style="margin-bottom: 20px"><tr>
<table style="margin-bottom: 20px"><tr>
<td>
<td>
<div><b>{{ recipient.name }}</b> {{ recipient.code }}</div>
<div><b>{{ recipient.name }}</b> {{ recipient.code }}</div>
<div>{{ recipient.address | newline_to_br }}</div>
<div>{{ recipient.address | newline_to_br }}</div>
<div>{{ recipient.identifier }}</div>
<div>{{ recipient.identifier }}</div>
</td>
</td>
<td style="border-right-width: 1px; padding-right: 20px; text-align: right">
<td style="border-right-width: 1px; padding-right: 20px; text-align: right">
{% for field in fields %}
{% for field in fields %}
<div style="font-weight: bold">{{ field.label }}</div>
<div style="font-weight: bold">{{ field.label }}</div>
<div style="margin-bottom: 10px">{{ field.text }}</div>
<div style="margin-bottom: 10px">{{ field.text }}</div>
{% endfor %}
{% endfor %}
</td>
</td>
<td style="padding-left: 20px; width: 1px; white-space: nowrap">
<td style="padding-left: 20px; width: 1px; white-space: nowrap">
<div style="font-weight: bold">{{ business.name }}</div>
<div style="font-weight: bold">{{ business.name }}</div>
<div>{{ business.address | newline_to_br }}</div>
<div>{{ business.address | newline_to_br }}</div>
<div>{{ business.identifier }}</div>
<div>{{ business.identifier }}</div>
</td>
</td>
</tr></table>
</tr></table>


<div style="font-size: 14px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
<div style="font-size: 14px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td style="width: 10px">#</td>
{% for column in table.columns %}
{% 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>
<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 %}
{% endfor %}
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
{% assign i = 0 %}
{% for row in table.rows %}
{% for row in table.rows %}
{% assign i = i | plus: 1 %}
<tr>
<tr>
<td style="width: 10px">{{ i }}</td>
{% for cell in row.cells %}
{% 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>
<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 %}
{% endfor %}
</tr>
</tr>
{% endfor %}
{% endfor %}
<td style="width: 10px">&nbsp;</td>
{% for column in table.columns %}
{% 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>
<td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}">&nbsp;</td>
{% endfor %}
{% endfor %}
{% for total in table.totals %}
{% for total in table.totals %}
<tr>
<tr>
<td colspan="{{ table.columns | size | minus:1 }}" style="padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
<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-color: #000; 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>
<td style="border-color: #000; 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>
</tr>
{% endfor %}
{% endfor %}


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


{% if emphasis.text != null and emphasis.positive %}
{% 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>
<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 %}
{% endif %}


{% if emphasis.text != null and emphasis.negative %}
{% 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>
<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 %}
{% endif %}


</tbody>
</tbody>
</table>
</table>