Generated Numbers - client_counter

Testing v5.0.40-C33 and running into some issues with Generated Numbers

{$client_id_number} doesnt return a value. Stays as {$client_id_number} once saved / sent
{$client_counter} seems to be generating the same value as {$counter} but not the client_counter value
{$counter} - works
{$year} - works
{$user_id} - works

Confirmed that this is not unique to my install. To reproduce:

Go to
Under generated numbers, invoices, number pattern, enter:

Generate a new invoice. You’ll see that it looks like this:
Generated Numbers

where {$client_id_number} isnt picking up a value at all, and client_counter is displaying the same value as counter.


Thanks for letting us know, we’ll look into it.

@david any thoughts?

Update on testing as of v5.0.44-C37:
{$client_id_number} is now working properly. {$client_counter} however is still showing the absolute {$counter} value instead of the individual {$client_counter} value


I can’t recreate this, $client_counter is working for me when i create invoices.


Steps to reproduce:

Settings> Generated Numbers> Incoives

Set Number Pattern to:
Client Counter:{$client_counter}-Counter:{$counter}

Create a few invoices for different clients. The client_counter shows the same value as counter, where i thought it should be a unique counter for each client invoice count? Or im mis understanding the purpose of client_counter.

counter results


Ah so i think you can only have one counter operating at a time.


ok. Well I tried setting Invoices Number Pattern to the following:
I-{$client_counter} (So that only one counter is operating at a time right?)

However the $client_counter value is still just showing same value as $counter would (it just counts the number of invoices ever created regardless of which client is being invoiced). Shouldn’t the $client_counter be showing the number of invoices for the client being invoiced?

Otherwise im not understanding its purpose of client_counter. How is it different from counter? My assumption was that it should be based on a new counter per client ID (which I would find really useful because i could have each invoice count per client ID and each client would know the total number of invoices they had)


  • Peter


I think i see a bug here, i’ll check in a fix for this.

@peterjm a fix for this is in the v5-develop branch,

please note you must use {client_id_number} with {client_counter} for it to work.

Can confirm this is working properly for me now in v5.0.47-C38 when i use both {$client_id_number} with {$client_counter}


Thanks for the update @peterjm!