Invoice Template - need to use different company addresses

Hi,

New to IN, and use the Hosted Platform.

We have two company addresses, a UK company address and a US company address.
Our clients have -UK or -US in their client ID to identify which company they should be invoiced from.

We want to use our UK address in the Header of the Invoice for all our UK clients, and use our US address for all our US clients.

I saw some JavaScript in the templates and thought I could use JS to switch between the two but it seems you don’t allow JS to run in the templates.

Is there any other work around to get what I need?
Otherwise the only other option I can see is to just delete our company address details on the platform, then create two templates, one for UK and one for US, and enter our UK or US company details in the Body area. That should work I think, but means I have to edit every one of our clients details to change their default invoice template setting to point to either the UK or US one.

Another other suggestions that I could do so that I just have one Template for all clients?

Thanks,
Ant.

Hi,

One option would be to use groups. You can create groups for US and UK and override the company address.

1 Like

Thanks for the quick response. That’s great. The groups do seem to be the perfect fit for my needs.

Thanks again,
Ant.

Glad to hear it, thanks for the update!

Hi,

I just have one follow up question. There doesn’t seem to be a way to batch add existing clients to a group. I seem to have to edit each client individually. Am ï correct or is there another way that I’m missing?

I’m guessing I could probably automate it using the API to update all clients, but wanted to check if it was available first within the UI.

Thanks,
Anthony.

That’s correct, if you have many clients using the API would be a good option.

1 Like

Thanks, I got that working, once I got the Hash IDs for Clients, and also the Hash IDs for the two Groups I set up which caught me off guard (hint for anyone else doing this process).

I exported the Clients Report in the UI making sure to include the IDs column which gave me the Hash IDs. Unfortunately the Group Hash IDs are not exported, just the names instead, so I used the Get Clients API call and inspected what the Group Hash IDs were. You can also use that to get the Client Hash IDs also, but easier to just get it from the UI Report.

On a slight tangent, when updating other fields or creating new clients using the API, you need to use the Invoice Ninja internal IDs for Currency Codes and Country Codes. You can get this information by doing an API call with URL “https://invoicing.co/api/v1/statics”, or you can view all the statics here on the Web Documentation:
https://invoiceninja.github.io/docs/statics/

I’m also a first timer using APIs as well! So for anyone else new to APIs like me, I used make.com (formulary Integromat), found it very easy to use.

End Result: All clients were updated successfully, and as Hillel mentioned I was now able to have separate company information and other settings for each group, meaning I just need 1 invoice template for all clients :slight_smile:

Thanks again Hillel for your excellent guidance and quick replies.
Ant.

1 Like

Seems to be an issue with the Group Counter. I tried to add the Group Counter to the Invoice Number but got this error relating to the Client Counter??