I dont know if anyone has ever implemented this, but here is the concept/situation:
Every ticket has an associated bill.
Some customers request a tax invoice as well, so we print that for them on request.
Every TAX invoice needs to have a serial number.
Since not every bill is associated with a TAX invoice, the number of bills will be different from the number of tax invoices.
So is there a way to run a counter on the TAX Invoices printed so that they have a valid count?
I was thinking of defining an Entity for this, and insert a new row everytime a new tax invoice is printed.
But to do that, how do i define an auto-increment custom field? And, how do i get the new entity created and add that to my ticket ?
So if you have a Program Setting that you called Tax Invoice Number, you would use this in your Template:
{SETTING:Tax Invoice Number}
In the case assigning an Entity, of for example an Entity Type called Tax Invoice Numbers, this would work better, since the Entity will have been attached to the Ticket:
{ENTITY NAME:Tax Invoice Numbers}
That assumes the Name of the Entity is the Invoice Number.
This was perfect!
dont even need to declare an entity or anything… i just needed a running number on my tax invoices. and the {SETTING; TAX INV NUMBER} did the whole trick.