| Subject |
Re: Invoice number |
| From |
Ken Mayer <dbase@nospam.goldenstag.net> |
| Date |
Sat, 5 Sep 2020 22:07:55 -0700 |
| Newsgroups |
dbase.getting-started |
On 9/5/2020 4:29 PM, Bami Onwu wrote:
> Hi all,
>
> I created invoicing app for a customer and it's working fine on standalone. When working under multiuser, it assigns one invoice number to two users.
>
> The invoice numbering is no more unique. I need advice on how to go about this.
Are you using autoincrement fields for the invoice number? If not (and
it's not required that you do, but it is *a* way to do it), don't create
the actual number until you save the record. There are event handlers
that you can write code in, so move the code that creates the invoice
number to the rowset's canSave event handler -- it fires in this case
before the invoice is saved, you create the invoice number value and put
it into the field, when the save actually occurs, it should be unique.
Ken
--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
|
|