Information générale
Catégorie:
The Mere Mortals Framework
>The Mere Mortals framework contains an approach to solve auto incremental for primary keys. However, as I was telling Nadya, I’d like to keep the primary key to link it by referential integrity to another entities and not to worry about skipping the sequence.
>
>I need a document numbering sequence “Folio” with some specific rules like:
>
>No skipping on the sequence. Invoices should have a strict sequence which is already printed on the document (this is a law imposed by the Mexican government).
>
>However, a user should be able to select a number ahead in the sequence and the auto incremental procedure should be able to detect the skipped number of the sequence to keep using them and discard those chosen by the users. I know this sound weird or crazy, but it has become a real need for invoice numbering implementation.
>
>Fortunately, by the end of the day I managed to complete the numbering sequence at trigger level as expected.
>
>Thanks and regards
>
>Oscar Corte
Oscar,
I had the same rule for an application I recently wrote. I finally wrote a custom stored procedure and called it only when the save mthod in my bizobj was called (not in the onnew method).
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement