How to add a prefix from the database?
At the forum I found this solution to manually add a prefix or suffix:
{field_name} = {field_name}.’%’; or {field_name} = ‘%’.{field_name};
But how to add a prefix from the one table and then add the year and the number of invoice?
Example result: INV-2013-0010 (INV- is stored in table user_invoice_prefix), 2013 is actual year and 0010 is invoice number (auto increment)
Is auto increment a good idea or not for the invoice number?
What happens after the transition year in 2014?
In 2014, I need a new number starting with INV-2014-0001
prefix is in one table - user_profile —> user_invoice_prefix
I have to add the entry to the table customer_invoice —> invoice_number
Thanks for all the advice in advance.
Rik