The discount calculation is carried out in the tax grid and in the invoicing element grid where it decreases the base subject to all the main taxes.
In the case of a document which is entered tax excluded, only the tax is impacted by this type of invoicing element. When the document is entered tax-included, the tax included amount is also impacted by the discount on tax.
No tax rule, accounting code or analytical dimension can affect this invoicing element because only the total invoice amount and the VAT accounts are impacted.