Commission added to cost instead of being deduced
In #11327 (closed) the commission price is added to the cost in margin report but indeed the sign of the commission price is negative when it is the same type (so a agent commission on a customer invoice) and positive for different type (a principal commission on a customer invoice). So the cost in margin report must be deduced by the commission price to make the agent commission appears as an extra cost.