> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobl.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Discount

Discount represents an allowance applied to the complete document independent from the individual lines.

## Schema ID

`https://gobl.org/draft-0/bill/discount`

## Properties

| Title | Property | Type | Description |
| - | - | - | - |
| UUID | `uuid` | string | Universally Unique Identifier. |
| Index | `i` | integer | Line number inside the list of discounts (calculated). |
| Key | `key` | [cbc.Key](https://docs.gobl.org/draft-0/cbc/key.md) | Key for identifying the type of discount being applied. |
| Code | `code` | [cbc.Code](https://docs.gobl.org/draft-0/cbc/code.md) | Code used by the issuer to refer to this discount. |
| Reason | `reason` | string | Reason why the discount was applied. |
| Base | `base` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Value used as the base for percent calculations instead of the invoice's sum of lines. |
| Percent | `percent` | [num.Percentage](https://docs.gobl.org/draft-0/num/percentage.md) | Percentage to apply to the base or invoice's sum. |
| Amount | `amount` | [num.Amount](https://docs.gobl.org/draft-0/num/amount.md) | Amount to apply (calculated if percent present). |
| Taxes | `taxes` | [tax.Set](https://docs.gobl.org/draft-0/tax/set.md) | List of taxes to apply to the discount. |
| Extensions | `ext` | [tax.Extensions](https://docs.gobl.org/draft-0/tax/extensions.md) | Extension codes that apply to the discount. |
| Meta | `meta` | [cbc.Meta](https://docs.gobl.org/draft-0/cbc/meta.md) | Additional semi-structured information. |

## Key Values

| Value | Description |
| - | - |
| `early-completion` | Bonus for works ahead of schedule |
| `military` | Military Discount |
| `work-accident` | Work Accident Discount |
| `special-agreement` | Special Agreement Discount |
| `production-error` | Production Error Discount |
| `new-outlet` | New Outlet Discount |
| `sample` | Sample Discount |
| `end-of-range` | End of Range Discount |
| `incoterm` | Incoterm Discount |
| `pos-threshold` | Point of Sale Threshold Discount |
| `special-rebate` | Special Rebate |
| `temporary` | Temporary |
| `standard` | Standard |
| `yearly-turnover` | Yearly Turnover |

## Validation Rules

| Field | Test | Validation Code / Message |
| - | - | - |
| `percent` | <ul><li>Base != nil</li><li>Present</li></ul> | `GOBL-BILL-DISCOUNT-01` Percent is required when base is set |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.