This is a business problem, not an IT technology, so it follows that you need a business solution, not an IT solution. This is not like working for a particularly insightful client. In essence, you feed the commission back to expenses and recount the commission 100 times. Thus, the seller receives a commission based on their commission?!? Jokes aside?: -)
. , , . , . .
, , , "" ( ), " " ( " + " ), " ( + ). -, .
, .
1: , ,
= + ( * (1 - ))
= + ( * )
2: , (, -, ),
= + ( * )
= * (1- )
= +
SQL . , , , . .
. , . - - , . , , .
!