Assign different templates to customer depending on branch

Alexandros 3 years ago updated by Jussi Rautio 2 years ago 3


I wanted to ask if anyone has found a method to automatically assign different quote and invoice templates as well as a numbering scheme to a customer, depending on the branch they have been assigned to? Perhaps using a macro after the customer has been created?

This is something that we would be very interested in as well


The numbering scheme seems easiest to adjust.

Quote and invoice templates would require additional client accounts at the moment and probably some sort of office structure.


To get different content in the templates depending on our branch we just use we use conditionals in the template code:

if(xtrfContext.getRootObject().getCustomer().getBranch().getId()==2) {
"An invoicing surcharge of SEK 45 will be added to the final invoice."
else {
"An invoicing surcharge of EUR 5 will be added to the final invoice."