VAT Early Settlement Discount
In the UK, if you allow a discount for early settlement of an invoice (aka prompt payment) then the VAT is calculated on the discounted amount regardless of whether the discount is taken.
Sub Total: 10.00
Net Total: 11.80
10% Early Settlement Discount (ESD)
So the VAT (20% in this example) is applied to 9.00, not 10.00.
However, if the customer pays by instalment, then you must account for VAT at the actual price paid.
Also, if you offer any incentive to a customer, known as an unconditional discount, then the VAT is calculated on the discounted amount provided the customer pays the discounted amount. Otherwise the VAT is calculated on the full value.
Finally there are contingent discounts. If you offer a discount on some contingency, eg. pay x amount by such and such a date, whatever happens, the VAT is calculated on what is actually paid. That of course may mean an adjustment is required in your accounts to accommodate it (eg. the discount taken).
Bear in mind that laws and regulations are subject to change so always check with UK HMRC if in doubt.
Note: it seems that this VAT rule only applies in the UK as I can find no reference to the rest of the Eurozone. Countries like the USA don't suffer from this type of beaurocracy, but note that VAT is being talked about in the States as an alternative to Sales Tax.