[16.11.1] Added new themes for invoices, quotes, orders, receipts etc


It seems that internal style sheet options are completely gone. Upon saving a theme they are removed. Is this meant to be so. Second: the preview option offered by View templates is also not there anymore.


If, by “internal style sheet,” you mean view templates, existing ones should still be available in the default theme. Mine was until I deleted it after I figured out custom themes were more useful. But it is possible access has since been removed.

The approach under custom themes is easier. When viewing a form (any form, not just sales invoices as with view templates), Switch Theme to your custom theme, then Edit theme. After editing, Update sends you directly to the form you are editing. No need to go back to Settings.

Hi @Tut

By “internal style sheet” I mean HTML like below to make theme/template more readable and versatile because I also use directive media=“print” to differ output between screen and hardcopy.

<style media="screen">
   .invoice .visible { color: gray;}
   .invoiceline .border { border: 1px solid darkgray }
    #container {
        margin: 30px 20px 0px 30px;
    #watermark {
        display: none;

I will give this a try. Thanks.

Now I understand what you meant. Unfortunately, I’m not knowledgeable enough to know whether the equivalent is possible in Liquid. I suspect it may not be supported, at least within Manager, because I have also had the experience where invalid code simply disappears. The fact that this happens to you suggests you have tried to implement something that isn’t currently (and perhaps cannot be) supported.

If it is supported, I’d like to learn more about it myself, because I now use different custom themes depending on my output media: one for screen/PDF and another matched to my printer and operating system. With your approach I could combine them. :slight_smile:

@Hans, <style> tag is not supported in themes (yet). And you can’t copy view template into theme. Those concepts are totally incompatible. Not only there are different variables (as themes are more generic) but also themes support only restricted HTML subset.

Have a look how existing sample themes are done and you can build on top of that. More in-built themes are coming soon. There is going to be someone working on bringing more themes into Manager.

View Templates were more flexible but the main issue with them was that PDFs were generated by external web service which had full “webkit” installed on it. Themes are more restricted but PDFs are generated internally within Manager (no dependency on 3rd-party servers).

1 Like

Thanks @lubos,

Fully understand your reasoning and concern. At work I have to deal with frameworks as iText and such.
I’m hoping “yet” will turn into “yes” for support. For now I will start rebuilding my (view) template into a theme.


At first I was really bummed that the custom view templates were gone but I’m liking the idea with each day. The issue here is that this was a revolution type of thing, not an evolution. It would have been better to have the themes for everything else apart from invoices since they had the view teplates then slowly transition them into using themes as well.

That aside, is there any documentation on how one can target the specific documents with specific designs? For example:

{% if title == 'Invoice' %}
.........Invoice design code here.....
{% endif %}

{% if title == 'quotation' %}
.........Quotation design code here.....
{% endif %}

{% if title == 'receipt' %}
.........Receipt design code here.....
{% endif %}

{% if title == 'customer_statement' %}
.........Customer Statement design code here.....
{% endif %}


This will be easier to work with since it would allow one to work on each block independently then add the design into the theme.

This feels like too big of a change to implement. I think I’ll set up manager on linux to try out the themes before I’m satisfied that my invoices will still look the same. Its bad enough sending new look invoices to clients yet again. :weary:

1 Like

@ChrisWambugu Your if statements for invoice should work. Just match the title to the title that is printed in the document and you are good to go.

{% if title == "Quotation" %}
I am a quote
{% endif %}
{% if title == "Payment" %}
I am a payment
{% endif %}
{% if title == "Receipt" %}
I am a receipt
{% endif %}
{% if title == "Statement" %}
I am a Statement
{% endif %}

Change the I am a XYZ to the custom code.

How about applying them to the reports?
Reason is that the default typography in the reports is boring and bit ugly.

There should be an option to change the default Helvetica/Sans-serif font.


Is it possible to insert a page break between rows in a table if it extends across pages?

This is specifically for sales quotes where I’ve included an image of the product as well as the description.

(The long way around would be to resize all of the pictures and limit the text to a specific number to fit each page, however if there is a workaround using liquid, I would appreciate the help.

The attached images should explain what I mean a little better.

I am using the first theme in manager, which no changes to the code.

The code MB022RG on the first page corresponds to the image and text on the second page. What I would like to happen ideally is for each product (row?) to fit on a page. Either individually or with multiple products.

Thank you!

This is really beyond the scope of this forum. You should check with web sites on Liquid. Start here: Liquid template language.

I tried going through github and stack overflow, but a lot of it went over my head.

Anyway will look elsewhere.

Thanks Tut!

Hello there, i have put a lot (and really a lot) of time in putting all kinds of html in my old invoice template. Everything is gone now. Is there a way to get my old invoice back??? It was not only a certain layout but it also had formulas in about when to pay and on what bankaccount and with what reference. Please help!!! :wink:

PS: i have copy pasted the whole html into a new template but it doesn’t work…

1 Like

Unfortunately, view templates, which were for sales invoices only, cannot be ported over to custom themes. Themes apply to the entire range of forms and some reports. So a view template would leave you with no code, as an example, for a purchase invoice or a cash receipt. The themes are written in Liquid, but much of the work you did on the template can guide your development of custom themes.

I know this can be frustrating, but the improvements that came with custom themes have ultimately produced a more consistent and professional look across all forms.

Can we do such a thing in the {{field.label}} , but for multiple fields? What’s the syntax?

Doing this for one field label is quite simple and follows the same approach as you quoted. Doing it for multiple labels is much more complex.

I tried this approach and it works…

{% if title == 'Purchase Order' %} Νέος Τίτλος {% endif %}
{% if title == 'Invoice' %} {% for field in custom_fields %} {% if field.label != 'CUSTOM FIELD NAME' %}{% continue %}{% endif %}
{{ field.text }}
{% endfor %}{% endif %}
{% if title == 'Purchase Invoice' %} New Title {% endif %}
{% if title == 'Quote' %} New Title {% endif %}
{% if title == 'Delivery Note' %} New Title {% endif %}
{% if title == 'Sales Order' %} New Title {% endif %}

and so on.

I hope it helps.

I just tried that and it worked!!

{% if title == ‘Δελτίο Αποστολής’ %}
{% for field in fields %}

{{ field.label | replace : “Παραπομπή” , “Αρ. Δελτίου Αποστολής” | replace : “Αριθμός Παραγγελίας” , "Αρ. Παραγγελίας "}}

{{ field.text }}

{% endfor %}
{% endif %}

You are giving a second “replace” and it works. I don’t know for many of them

Hi there
While I need to record GST as I haven’t reached the threshold for tax purposes I need to have invoices that don’t include it, is there a way to have this with the themes. My old invoice I edited the HTML and removed all that code, but looking through the theme it appears this is not possible.

If you don’t check a tax code on any line item, nothing related to taxes will appear on an invoice.