I am finishing up a new version of one of my apps and I want to give the user the ability to specify the starting invoice number.
In the table I have a field "Invoice_ID" that is C,16,0 setup as Auto Increment and used for the primary index. No one really ever sees this number and it is only used within the database for index purposes and to tie everything together.
I Also have a field "Invoice_Number" in the table and is the one that they see and prints out on reports. It is also currently C,16,0 Auto Increment and I have the starting value set at "1001". I can change the field type or settings if needed as long as I do it before deployment of the app. I want the end user to be able to specify the starting number so if they want to start the invoice numbering at 20000 they can.
I was thinking I could setup a field in a "Settings" table where they could input the number they wished the next invoice to start counting from but my brain is going blank on the best way to get the number to auto increase up from there.
One of the main reasons for wanting to do this is I have several hundred customers of my app that want the new version and do not want to start the invoice numbering back with invoice numbers they have already used. The new app is so different from the other one that I cannot just put it out there as an upgrade but will be another stand alone app instead.
Any advice or suggestions would be appreciated.
Thanks in advance,
Preston.
In the table I have a field "Invoice_ID" that is C,16,0 setup as Auto Increment and used for the primary index. No one really ever sees this number and it is only used within the database for index purposes and to tie everything together.
I Also have a field "Invoice_Number" in the table and is the one that they see and prints out on reports. It is also currently C,16,0 Auto Increment and I have the starting value set at "1001". I can change the field type or settings if needed as long as I do it before deployment of the app. I want the end user to be able to specify the starting number so if they want to start the invoice numbering at 20000 they can.
I was thinking I could setup a field in a "Settings" table where they could input the number they wished the next invoice to start counting from but my brain is going blank on the best way to get the number to auto increase up from there.
One of the main reasons for wanting to do this is I have several hundred customers of my app that want the new version and do not want to start the invoice numbering back with invoice numbers they have already used. The new app is so different from the other one that I cannot just put it out there as an upgrade but will be another stand alone app instead.
Any advice or suggestions would be appreciated.
Thanks in advance,
Preston.
Comment