[eluser]Wuushu[/eluser]
Table
T_INVOICE
fields
F_ID F_INVOICE_ID F_USER_ID F_OTHER_INFO
5 1003 12 .
4 1001 9 .......
3 1001 38 ...
2 1000 9 ....
1 1000 38 ....
Make in your model a function to see if a user has previous invoices, if not set insert-ID (F_INVOICE_ID) to 1000, if not, take value from last known invoice ID (F_INVOICE_ID), and increment it by 1.
Did i misunderstand your question/problem? If so forgive me.
Kind regards,
Christian S
Edit: Forum form ate my spaces