Hello guys,
first of all i would like to thank you for this amazing and useful application.
I have a problem when i try to export as pdf or send with e-mail my invoice.
I don’t have some error messages only a blank error window with ok button.
If i change theme for invoice work perfect but i can’t understand what happen with my custom theme.
Check bellow my code:
<table style="padding: 30px; font-family:'Courier New', Courier, monospace;">
<p style="font-family:'Courier New', Courier, monospace; padding:20px 0 0 20px;">ΑΘΕΩΡΗΤΑ ΒΑΣΕΙ ΠΟΛ. 1004/2013</p>
<thead>
<tr>
<td colspan="99">
<table style="margin-bottom: 80px"><tr>
{% if business.logo != null %}<td style="text-align: left" width="50%"><img src="{{ business.logo }}" style="max-height: 1200px; max-width: 250px" /></td>{% endif %}<td width="50%" style="font-weight: 700;"> <div>{{ business.name }}</div>
<div>{{ business.identifier }}</div>
<div>{{ business.address | newline_to_br }}</div></td>
</tr></table>
<table>
<td>
<p><b>ΤΙΜΟΛΟΓΙΟ ΠΑΡΟΧΗΣ ΥΠΗΡΕΣΙΩΝ</b></p></td>
<td>
<b>Αρ.Παραστατικού: ΤΠΥ {% for field in fields %}
{% if (field.label != 'Αρ. Τιμολογίου') %}{% continue %}{% endif %}
{{ field.text }}
{% endfor %}</b></td>
<td> <b>Ημερομηνία: {% for field in fields %}
{% if (field.label != 'Ημερομηνία Τιμολογίου') %}{% continue %}{% endif %}
{{ field.text }}
{% endfor %} Ώρα: {% for field in custom_fields %}
{% if (field.label != 'Ώρα') %}{% continue %}{% endif %}
{{ field.text }}
{% endfor %}</b></td>
</table>
<table style="margin-bottom: 20px">
<td width="15%" style="border-right-width: 1px; border-left-width: 1px; border-top-width: 1px; border-bottom-width: 1px; padding:10px;">
<div>Κωδ. Πελάτη</div>
<div>Επωνυμία</div>
<div>Επάγγελμα</div>
<div>ΑΦΜ</div>
<div>ΔΟΥ</div>
<div>Διεύθυνση</div>
<div>Τηλέφωνο</div>
<div>E-mail</div></td>
<td width="50%" style="border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; padding:10px;">
<div>{{ recipient.code }}</div>
<div>{{ recipient.name }}</div>
{% for field in custom_fields %}
<div>{% if (field.label != 'Επάγγελμα') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'ΑΦΜ') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'ΔΟΥ') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
<div>{{ recipient.address }}</div>
{% for field in custom_fields %}
<div>{% if (field.label != 'Τηλέφωνο') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'E-mail αποστολής') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}</td>
<td width="18%" style="border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; padding:10px;">
<div>Σκοπός</div>
<div>Από</div>
<div>Προς</div>
<div>Τρ. Πληρωμής</div>
<div>Σχ. Παραστατικά</div>
</td>
<td width="17%" style="border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; padding:10px;">
{% for field in custom_fields %}
<div>{% if (field.label != 'Σκοπός') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'Από') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'Πρός') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'Τρ. Πληρωμής') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
{% for field in custom_fields %}
<div>{% if (field.label != 'Σχ. Παραστατικά') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
</td>
</table>
</td>
</tr>
<tr>
{% 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 %}; width: 80px{% endif %}">{{ column.label }}</td>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in table.rows %}
<tr>
{% 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>
{% for column in table.columns %}
<td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}"> </td>
{% endfor %}
</tr>
{% for total in table.totals %}
<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 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 %}{% if (total.label == 'Balance due') %}{% continue %};font-weight: bold{% endif %}">{{ total.text }}</td>
</tr>
{% endfor %}
<tr>
<td colspan="99">
<div style="border-bottom:0.5px solid #463AFF;"><p><b>Σημειώσεις</b></p></div><br>
{% for field in custom_fields %}
<div>{% if (field.label != 'Σημειώσεις') %}{% continue %}{% endif %}{{ field.text }}</div>{% endfor %}
<div style="font-size: 14px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
</td>
</tr>
<tr>
<td colspan="99"><div style="border-bottom:0.5px solid #463AFF;"><b><p>Λογαριασμοί Κατάθεσης</p></b></div><br>
<div>Λογαριασμοί</div>
</td></tr>
{% 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: 1px; border-color: #006400; padding: 10px; font-size: 20px">{{ emphasis.text }}</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: 1px; border-color: #FF0000; padding: 10px; font-size: 20px">{{ emphasis.text }}</span></div></td></tr>
{% endif %}
</tbody>
</table>