Answer the question
In order to leave comments, you need to log in
Stock. What is the best way to account for goods?
Hello friends) The question is probably simple, but now I'm a little puzzled by it. I have a warehouse. Accounting for goods: income, expense, write-off (marriage) . There will be a lot of operations and I had two ideas to take into account the goods:
Answer the question
In order to leave comments, you need to log in
I would do this:
- Incoming table ( DateTime , FK Invoice, FK Nomenclature, Quantity, Price);
- Expense table ( DateTime , FK Invoice, FK Nomenclature, Quantity, FK Price);
- Table Write -off (DateTime, FK Act of write-off, FK Nomenclature, Quantity, Reason);
- Table Balances (DateTime, FK Nomenclature, Quantity). The table will store the entire chronology of changes in balances (it will be possible to see the balances at any point in time in the past);
In order for the data in the tables to be consistent, it is necessary to write to them in transactions. For example, if the warehouse received 10 pencils, then inside the transaction an entry will be made in the Incoming andRemains . Theoretically, you can do without the Residuals table , since the residuals at any point in time can be calculated from other tables, but in terms of reducing the load on the server, I would leave it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question