Atomic Shrimp
Humanoid lifeform
- Local time
- Today, 20:13
- Joined
- Jun 16, 2000
- Messages
- 1,954
In my spare time, I'm designing an inventory and sales system - the goal is for it to be the most perfect system of its kind (no point in aiming low).
I thought it would be good to discuss the storage of transaction data. I want to get this right...
Several different models occur to me:
1. Explicitly-typed documents
Each transaction consists of a header record (in a transaction headers table), detailing the transaction type (Invoice, Credit, GRN, Remittance, etc) and other details pertaining to the whole document.
A transaction details table holds one or more detail records appearing on the document (products, charge items, etc), along with quantities, etc.
2. Mixed type documents
As above, but with the transaction type devolved to detail level - this would allow a single transaction document to be both a credit and re-invoice (in the case of a customer return, say), or an invoice and a remittance (in the case of cash sales), etc.
3. Explicity-typed documents, with an additional batching/grouping layer
As (1), but with another table or data structure, enabling a group of documents to be related together, so that a credit and re-invoice can be later traced as being part of the same customer return and resupply.
(this hybrid solution seems like it might be a bit clunky to administer though).
What do you reckon? None of the above is difficult in terms of creating a data structure, but would any of them be regarded as inherently flawed from an accounting perspective?
I thought it would be good to discuss the storage of transaction data. I want to get this right...
Several different models occur to me:
1. Explicitly-typed documents
Each transaction consists of a header record (in a transaction headers table), detailing the transaction type (Invoice, Credit, GRN, Remittance, etc) and other details pertaining to the whole document.
A transaction details table holds one or more detail records appearing on the document (products, charge items, etc), along with quantities, etc.
2. Mixed type documents
As above, but with the transaction type devolved to detail level - this would allow a single transaction document to be both a credit and re-invoice (in the case of a customer return, say), or an invoice and a remittance (in the case of cash sales), etc.
3. Explicity-typed documents, with an additional batching/grouping layer
As (1), but with another table or data structure, enabling a group of documents to be related together, so that a credit and re-invoice can be later traced as being part of the same customer return and resupply.
(this hybrid solution seems like it might be a bit clunky to administer though).
What do you reckon? None of the above is difficult in terms of creating a data structure, but would any of them be regarded as inherently flawed from an accounting perspective?