# Total Discount

This feature lets you apply a percentage discount calculated on the total of a sales invoice. The discount is not spread across the individual lines: the system automatically adds a G/L account line with a negative amount equal to the specified percentage.


Open the **Sales & Receivables Setup** page and, on the **General** FastTab, fill in:

| Field | Description |
|---|---|
| Total Discount Posting Group | General product posting group used for the discount line. The line's sales account is taken from the **General Posting Setup** for the combination of the customer's general business posting group and this group. |

On the selected general product posting group you can enter a **Line Description**: it becomes the description of the discount line. The text can contain `%1`, which is replaced with the discount percentage (for example "Total discount %1%").


On the **Sales Invoice** page, **Invoice Details** FastTab, the following field is available:

| Field | Description |
|---|---|
| Total Discount % | Discount percentage to apply to the document's total amount. |

The field is also stored on posted sales shipments and posted sales invoices.


1. Set the **Total Discount Posting Group** in Sales & Receivables Setup and make sure the General Posting Setup has a **Sales Account**.
2. Create the sales invoice and enter the lines.
3. Enter the **Total Discount %** on the Invoice Details FastTab.
4. Recalculate the invoice discount (for example by opening the statistics or by releasing/posting the document): the discount line is added at the end of the document.


- Every time the invoice discount is recalculated, the existing total discount line is deleted and recreated with the updated amount.
- The discount amount is the specified percentage applied to the amount (excluding VAT) of the other document lines, rounded.
- The line is created with quantity 1 and a negative unit price equal to the discount amount, on the sales account from the General Posting Setup.
- If the percentage is cleared, the discount line is removed at the next recalculation.
- If the posting group in Sales & Receivables Setup or the sales account in General Posting Setup is missing, the system shows an error.