I have a problem and can't figure out how to fix it.
I created a new cart price rule with a 20% discount I want to subtract the discount after the tax is applied. So if I have an Item which cost 250 € the customer should have 50 € discount. Unfortunately the discount is only 41.85 € (250/1.19 * 20%). So the discount is calculated from the product price without tax. How can I achieve that the discount is applied after the tax?
Cart rules are set based the subtotal excluding tax. It is because the tax is applied on subtotal based on the tax percentage you set in your Magento tax configurations.
You'd need to customize the discount feature by writing custom code. Magento 2 allows you to write PLUGINS to overwrite core features.
I hope that helps.