I'd like to have organised invoices in this format:
AB20140001
AB
is the acronym of our company, 20140001
is the first invoice in 2014.The current quick idea is to add to the table invoices
columns year
and invoice_number
and where would be stored 2014
and the current number of invoice (0001
for the first one).
However, how to keep the column invoice_number
in the format XXXX
(for the second invoice would be the number 0002
and so on)?
Or - is there a better way to organise invoice numbering?
Thank you in advance.