Vat With Discount - Wrongly Calculated

When an order has a discount, the VAT is being charged without taking the discount into account, it just calculats the VAT over the subtotal value of the order, not the liquid result with the discount, how can I solve this?

Thank you,


Sorry, by VAT I mean the taxes...

Settings->General->Tax calculation method based on:

Thank you!! I had based upon unit price, now I've changed it to subtotal. Does this setting have any other implications that I should know about, I mean, is it going to change anything else?

Not that I am aware of. Default is subtotal.