You need to configure commissions to be calculated on sales, only after all discounts are taken on the line items of a sales order