I'm not sure if this is what you are thinking of, but it works:
Have one inventory table containing 1 record per item with the current quantity on hand, etc.
Have a common history table, to which a record is added by all movements which increment / decrement the on-hand. Define a type field with different values for each type of movement to aid analysis.
Then for each type of movement, update these two tables on saving a new transaction as appropriate.
Kevin
Précédent
Suivant
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