I need an ideea of implementing a standard multi-level management system.
A product is being sold and depending on where the sales agent is positioned in the hierarchy, he will receive points for the sale accordingly , and the agents/managers that are above him in the hierarchy will also receive points for the same sale.
The logic is based on a 12 level hierarchy. I need ideas on implementing it, because I do not have time to make experiments.
I need to know the ideal tables structures, relationships and so on
I'm sure some of you guys have done it already in your programs.
Another thing. The main program that records in a database the sales is already done, so I need to modify it to accept the new logic. For now, you must know, that I already have a table that holds the sales as records, and for each record (sale) there is a sales agent that receives points for the sale. I must figure out how to implement the multi-level logic in all this.