If an invoice is created independently of any quote, its number should ALWAYS be superior of the very last quote created.
The next quote should also have a number superior to the very last invoice created. This way, all quotes and invoices will be listed in a logical chronologic order.
Order number should always be the SAME as the linked Quote. (if ever generated)
also add an option to start from a higher number than one or custom number based qualifying ID (some companies already have quotes, orders and invoices with their own formats and won't start from scracth)
The following system works as following :
Quote n° 1 -> Generation of the Invoice n°1
If an invoice is created independently of any quote, its number should ALWAYS be superior of the very last quote created.
The next quote should also have a number superior to the very last invoice created. This way, all quotes and invoices will be listed in a logical chronologic order.
Order number should always be the SAME as the linked Quote. (if ever generated)