What is the design idea of the invoicing system? I have never done a similar project. let's take a look at the general idea.
Generally, A, B, and C are three-layer proxies. C purchases goods from B, B purchases goods from A, and A has A total product inventory table.
My current design idea is to create another purchase table, write the data of each purchase to this table, and then traverse the entire purchase table to calculate the required data when collecting statistics?
However, this design is equivalent to having to traverse the entire purchase table every time the incoming data is called. Will this be unreasonable?
It is a small project, and the data volume is not very large.
Could you tell me how the design is reasonable for experienced predecessors? Thank you ~~~
Reply to discussion (solution)
The invoicing system is a system that simulates material accounting business processes and has strict operating rules.
It is mainly about design ideas. I think the above ideas are not reasonable.
This invoicing is only an additional function. it is not a very comprehensive pure invoicing system, but it is just the most important thing to achieve.
The data required for the entire purchase table is calculated. what data needs to be traversed each time? Can't you accumulate it?
You can refer to the erp inventory documentation.