user is creating an invoice, user is able to see the invoice number ( say, XYZ0001 ) although user never save that invoice
so basically:
- invoice number is created incrementally when user is creating a new invoice
- invoice number is unique
- invoice can be created in random order, meaning, it is ok for a user saved first with invoice number XYZ0099 where another user with invoice number XYZ0098 still creating invoice
- when user, for some reasons, did not save their invoice, assigned invoice number is available for next user.
i have manage to complete everything but handling when user did not save the invoice if user close their browser or disconnected from server and make assigned invoice number available, how should i resolve this? any suggestion?
Use a UUID
Обсуждают сегодня