Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to increment Invoice Numbers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00318551
Message ID:
00318695
Vues:
25
>Hi,
>I'm wondering where/how do folks increment Invoice Numbers. My queries are as follows:
>
>1. I generally use Table Buffered views
>2. If I increment the Incoice immediately, and then the transaction is cancelled for some reason, I have MISSING invoice numbers
>
>3. If I increment AFTER a Tableupdate, its two processes I cant easily rollback
>4. I cant lock the next available file as there are other users who will want to increment all the time.
>

We have Point-Of-Sale Systems installed in dutyfree shops operates just like a supermarket, and our technique of having a consistent incremental invoice number is:

1. each cashier have their temporary transaction for the day created in their workstation.
2. after every transaction however, the finalized one will be sent to server immediately.
3. we setup a table called transdbf handling transaction nos. It has two fields: temptranno, finaltranno.
4. at the time the transaction begins, the temptranno will be used as the key field for connections, and after that the transaction is finalized, the finaltranno will come to play using scan...while...endscan to replace the temporary tran. number with the final one on the detail part of the transaction.

This approach solves the following:
1. avoids duplicate invoice nos. between two different cashiers.
2. faster approach than calculate sum.
3. minimizes unused transaction number which is an important factor for auditing. In fact, no unused tran. no. will be served except for cancelled one.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform