By using an expression which calculates the commission in accordance with your
business rules and fitting the structure of your tables... neither of which
anyone on the newsgroups can see.
Most organizations do not compute commission on a sum of prices but on sales
above a set value.
Some even use a variable scale so that the higher the sales the higher the
percentage of the commission.