By default, the app considers the Compare at price as the base price while applying discounts or calculating shipping charges. For example, take a product with:
Compare at price of $39.99 and
Sales price of $34.99
For a customer in the discount group 'Wholesale' which has a percentage discount of 60%, the product will be available at $15.99, which is after a 60% discount on the Compare at price of $39.99.
If you would like to change the default settings and apply discounts to the Sales price, here is an article to help you out.
Once the settings are changed, the discount will be applied to the Sales price of $34.99 and the product will be available at $13.99.