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

Will this editing using this liquid language that you mentioned a while back - I think you were talking about WYSIWYG or will we still need to know html to make a custom theme. This is the route that I will be going down as I want to use my company brand colours.

it make me won’t upgrade it cause if lose the view template @lubos!

the new system is awesome, but before the template can edit via the default with option, can you teach us the way to activate back the view template after upgrade to new system?

@lubos another issue is like, in my custom template, i modify it so that in the end of my invoices, it have column for signature, is your new system able to do this as well?

If you already had custom view templates defined, they will still be available after updating. But the options is not there to create new ones. And new users cannot create them at all.

To be certain, back up your business before updating. Then, when updating, preserve the old version of the program so you can go back to it if necessary. Import the business into the new version land confirm your custom template works before making the final switch. My own custom template works in the new version, but I can’t guarantee yours will.

Hello There…
Great Job with the new Version…
Regarding your comment, can you let us know when will it be possible to have the version that will allow users to create/modify the themes?

Thanks

Most likely tomorrow.

1 Like

Great… Thanks

Thanks and salutes to Lubos! A great update indeed!
Business Identifier details have vanished from printed documents in the updated version (16.11.21). It is mandatory as per law to mention our TIN, VAT and other details on the documents. Can you please look into this.

Simply wonderful. I never thought of this beautiful implementation to come true. Thumbs up…

Just one request: Lets go further. Let it be applicable to all printouts including all reports… I (and may be we) need it even for internal documents.

I am keen to try the new themes but I am a little hesitant in deleting my original custom view templates in order to try these themes out.

I have designed 10 View Template invoices each with a subtle difference enabling me to pull data from custom fields from the Customer tab (vehicle details 1-10), in a position where I wish to show them on the custom invoice, then, when creating a new Invoice, I select the appropriate View Template Invoice from the drop down list. It then shows the correct vehicle on that invoice. Also have a custom field on invoice to show “Mileage” which allows me to enter that information.
I use the custom template so I can show individual vehicle on the invoice. I tried it with the standard invoice but it shows all vehicles from the customer custom fields as I have to tick box “show on printed document”

The questions.

If I delete all of my old view template invoices, will all of the custom field/vehicle data information be kept on all my old invoices or will all that information be gone?

You have introduced the custom themes, enabling us to create our own themes, will this work the same way as the view templates? i.e. Have a drop down on invoice creation showing all themes so I can select the correct theme for the correct vehicle/custom field from customers tab.

The new themes are supported on Quotes and other documents, does this mean you can edit code on these documents?
If I edit code on say invoice will that have edited code on sales quote? As in, the vehicle information be on the sales quote?

A lot has happened recently, really don’t know how you do it! Do you ever sleep?!
Thank you for such a superb program.

You don’t have to do this. I’m not sure what that was a reference to. I have a custom view template, and it is still available and functions as before in v 16.11.28. But that is only true for legacy businesses. If you create a new business, the View Templates option is missing from Settings.[quote=“itmoto, post:34, topic:7554”]
If I delete all of my old view template invoices, will all of the custom field/vehicle data information be kept on all my old invoices or will all that information be gone?
[/quote]

I think this question is moot, since you don’t have to delete templates.

No, there is a Switch Theme button that applies across all forms/tabs until a new theme is selected.

Not exactly. You edit code for the theme itself as you did for view templates. But you do not edit individually for quotes, invoices, purchase orders, etc. I haven’t experimented enough yet to know how multiple custom fields will be handled, but the custom fields themselves are not affected.

If I were you, I would import my entire business as a new test business and play games there to see what happens. I think all will work out for you. You may or may not want to keep your view templates, but so far, themes look more flexible to me.

The Business Identifier field is missing after I update the application for Themes. Example: The GST number that was supposed to reflect on a Tax Invoice is missing.

Which theme? And was this a custom field?

Thanks @Tut.

I think that’s the best plan. Have a business back up and also backed up the previous version. Fingers crossed I will not need them!

Have a test business I have already set up so will give it a go on that first.
I usually wait a good few weeks before updating to the latest version and keep an eye on the forum so any teething issues can be resolved. Keen to take a look at these new Themes.
Hopefully the switch Theme button is similar to how the old View Template drop down works or I may be in trouble!

Slightly puzzled at Lubos’s comment about having to delete all previous custom view templates to allow new Themes?

1 Like

Actually, it’s easier and more obvious. You can do it right from the View screen instead of having to scroll to the bottom of the Edit screen. You’ll like that aspect of it, I think.

Since I wrote my earlier post, however, I experimented by copying the code for my custom view template and pasting it in as the code for a new custom theme. The result was a blank white rectangle about 5 pixels high, with nothing in it. So the easy route to transferring templates into themes didn’t work out. But I think that’s because the main part of the program defines a lot of things that were formerly in the view template. The theme code blocks are actually quite short, though. I was able to reproduce the changes from my old view template by modifying only 3 lines of code. And one of those modifications was a straight deletion. If you could do what you’ve described for your 10 view templates, you’ll have no trouble modifying themes.

I am actually having a look now! Couldn’t resist!
Seems fairly simple, just pasted the code from the standard theme (without colours) to a new theme.

Going to see if the variables work from my customer custom fields. Hopefully just a matter of copying and pasting my extra lines of code. The only other main differences i have made to my invoices was to reduce and increase font sizes, adjust padding, just to enable more words fit the table without wrapping.

Unfortunatley the variable i have used doesn’t seem to work :confused: - {{ customer.custom_fields }}
And neither does {{ custom_fields }}

@lubos is this not supported yet?

Variable names have changed completely. This is because themes are more generic and support all documents (not just invoices).

So instead of {{ customer }} variable, there is {{ recipient }} variable which can be customer, supplier, employee etc.

So you can’t really copy & paste the old template. It won’t work.

The best way to create new theme is to fork existing one and start modifying it until it suits your needs.

To enable me to show data from customer custom fields would I enter {{recipient.custom_fields}} ?

I tried {{custom_fields}} to show custom field from invoice but that didn’t work.

Do themes not allow custom field data?

What do you mean by fork existing one??

Can i suggest to choose/switch theme option by administrator only? As I noticed that my colleagues are switching themes back and forth and I am ending up filing different themed invoice/quotes hard copies.

Well, {{ custom_fields }} variable is an array of custom fields so you have to loop through them like this:

{% for field in custom_fields %}
<div>{{ field.label }}</div>
<div>{{ field.text }}</div>
{% endfor %}

I just made it in the latest version (16.11.40) so that custom_fields array will contain custom fields from customers, suppliers or employees if they are set to show on printed documents (which I assume are set that way in your file).

Anyway, default themes will pick those custom fields now so you can also have a look how it’s done in those themes.