Common invoice counter for one user and several companies?

Hello all,

I am using a self-hosted v5, and currently setting it up. It’s really great.

I am wondering if I can set up a common counter for my user. The reason is that I am using two brands for one company:

Company A
=> Brand X (sells via website to consumers) → invoices generated via API from website
=> Brand Y (sells to companies) → invoices generated manually in InvoiceNinja

=> one common counter ?

In order to get correct branding, I have set up Brand X and Brand Y as 2 separate companies under one user.
Is there a way these 2 “virtual companies” can share one counter ? From what I understand, none of the current options apply, but I think this could be useful.

Thanks in advance,
Stephan.

Hi,

Thanks, that’s great to hear!

One option may be to create the two companies as two groups under a single company instead of two sub-companies.

1 Like

Thanks @hillel for your quick reply. It was not that intuitive to me but I will try it today :slight_smile:

I think this may be a good example of us making the common easy and the uncommon possible. This isn’t a standard setup but the flexibility v5 provides should support it. If you have any trouble getting it working let us know.

1 Like

I like your approach!

I will try later today and let you know.

Complementary questions:

  1. I am not sure whether I should leave Number Pattern empty (and it will automatically increment across groups) or should I use {$counter} ?

  2. The optimal solution for me would be if invoices and credits share a common counter. Is {$counter} the solution to this?

  1. To share the number you would just use the counter variable.

  2. I’m not sure if that’s possible, @david any thoughts?

I am setting this up.

My first hurdle :
I have created my account for Company A

I want to set up a group for each brand as discussed. But for each group, the template displays $company.logo , $company.name etc.

I cannot see any $group variable for the templates. Am I missing something?

You can use the company variables.

Because the client belongs to the group it will use any settings the group has overridden.

This works - amazing! I really like v5

Well done :slight_smile:

1 Like

Thanks, that’s great to hear and means a lot!

We need to write better documentation to explain all of the new features…

1 Like

Once we have defined the correct counter, the {$counter} variable should be correct across any situation.

1 Like