Hi
I’m having a few issues with the new themes. We had an invoice in the old templates which worked fine, but after recently upgrading to version 16.12.11 (on Windows 10), we decided to try working with themes.
However there are some things that aren’t rendered correctly.
-
Using rowspan in a td-tag doesn’t work. When I change the theme and save it, it automatically removes the rowspan-attribute.
So<td rowspan=”3”>
changes to<td>
. -
We worked around the above issue, by using a table inside a td-tag. This works fine in the preview and print function. However when using the pdf-button (and e-mail), the inner table and all its content is not visible at all. There’s just an empty spot.
-
A few css-properties are not working in my invoice.
a.<td style="padding: 0.5cm 0;">
At first sight, it looks like padding is ignored everywhere, when using the pdf-button. In preview mode, everything is fine.
b. I have the following code, which shows an image over the entire width of the invoice. However when using the pdf-button (and e-mail), it ignores “width:100%” in the style attribute of the image tag.
I fixed this for now, by changing the image itself to almost the correct width and added “text-align:center;” to the parent td-tag. But it’s not the best solution. Code:
<tfoot> <tr> <td colspan="2" style="border-top: 1px solid #000; text-align:center;"> <img src="file:///C:\managerio\factuur-1.jpg" style="width:100%; margin: 20px 0 0 0"> </td> </tr> </tfoot>
-
In the example invoices, all fields are just visualized by looping through the fields array and printing them on the invoice in the order they come.
In my case, each field is at a certain predefined spot and the fields are not next/under each other. The field “invoice number” is for example at the top left, while the “invoice date is at the bottom right. To put the correct field on the place where I want them, I have now used the following code:
`
{% for field in fields %}
{% if field.label == “Bestelnummer” && field.text != null %}
Uw referentie
{{ field.text }}
{% endif %}
{% endfor %}
The problem here is that I have to rely on “field.label”. This depends on the users language settings (in this case Dutch). I’m afraid that after a next update, some changes will happen to the language files and the description of fields will change. This would break my code.
Maybe it’s a good idea to add a property “field.id” and this is always the English description and even if the English label would change after an update, id should always stay the same.
If there is another (better) way to solve my problem, please let me know.
Point 3 and 4 are not very crucial, because we have a workaround, but point 1 and 2 are really a problem, because we can not send any invoice at this moment through e-mail. If only one of these issues is fixed, we are saved.
Regards and thanks in advance
Johan