---
title: "CustomTaxPreset – API-Referenz · Quittio"
description: "Ad-hoc tax preset, e.g. for an exemption with a specific legal reference."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Tax/CustomTaxPreset"
locale: de
meta:
  "og:description": "Ad-hoc tax preset, e.g. for an exemption with a specific legal reference."
  "og:image": "https://quittio.dev/og/quittio-de.jpg"
  "og:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "CustomTaxPreset – API-Referenz · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-de.jpg"
  "twitter:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

[API reference](https://quittio.dev/docs/api) / [Quittio](https://quittio.dev/docs/api/Quittio) \\ [Core](https://quittio.dev/docs/api/Quittio/Core) \\ [Tax](https://quittio.dev/docs/api/Quittio/Core/Tax)

# CustomTaxPreset

final readonly class in quittio/core · implements [`TaxPreset`](https://quittio.dev/docs/api/Quittio/Core/Tax/TaxPreset)

`Quittio\Core\Tax\CustomTaxPreset` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/core/src/Tax/CustomTaxPreset.php#L17)

Ad-hoc tax preset, e.g. for an exemption with a specific legal reference.

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `->category()` | |
| `->exemptionReason()` | The text of the locale, else of its language ("de" for "de\_CH"), else the English or the first one. |
| `->exemptionReasonCode()` | |
| `->key()` | |
| `::make()` | |
| `->rate()` | |

### `__construct()`#

```
public function __construct(
    string $key,
    VatCategory $category,
    ?BigDecimal $rate = null,
    VatExemptionReasonCode|RawCode|null $code = null,
    array<string, string> $reasons = [],
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$key` | `string` | |
| `$category` | `[VatCategory](https://quittio.dev/docs/api/Quittio/Core/Enums/VatCategory)` | |
| `$rate` | `?Brick\Math\BigDecimal` = `null` | |
| `$code` | `[VatExemptionReasonCode](https://quittio.dev/docs/api/Quittio/Core/Enums/VatExemptionReasonCode)\| [RawCode](https://quittio.dev/docs/api/Quittio/Core/Codes/RawCode)\|null` = `null` | |
| `$reasons` | `array<string, string>` = `[]` | exemption reason text per locale |

### `category()`#

```
public function category(): VatCategory
```

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Enums/VatCategory">VatCategory</a></code></dd>
</dl>

### `exemptionReason()`#

```
public function exemptionReason(?string $locale = null): ?string
```

The text of the locale, else of its language ("de" for "de\_CH"), else the English or the first one.

| Parameter | Type | Description |
| --- | --- | --- |
| `$locale` | `?string` = `null` | |

<dl><dt>Returns</dt>
<dd><code>?string</code></dd>
</dl>

### `exemptionReasonCode()`#

```
public function exemptionReasonCode(): VatExemptionReasonCode|RawCode|null
```

<dl><dt>Returns</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Enums/VatExemptionReasonCode">VatExemptionReasonCode</a>| <a href="https://quittio.dev/docs/api/Quittio/Core/Codes/RawCode">RawCode</a>|null</code></dd>
</dl>

### `key()`#

```
public function key(): string
```

<dl><dt>Returns</dt>
<dd><code>string</code></dd>
</dl>

### `make()`#

```
public static function make(
    string $key,
    VatCategory $category,
    BigDecimal|int|float|string|null $rate = null,
    VatExemptionReasonCode|RawCode|string|null $code = null,
    array<string, string>|string|null $reason = null,
): self
```

static

| Parameter | Type | Description |
| --- | --- | --- |
| `$key` | `string` | |
| `$category` | `[VatCategory](https://quittio.dev/docs/api/Quittio/Core/Enums/VatCategory)` | |
| `$rate` | `Brick\Math\BigDecimal\|int\|float\|string\|null` = `null` | |
| `$code` | `[VatExemptionReasonCode](https://quittio.dev/docs/api/Quittio/Core/Enums/VatExemptionReasonCode)\| [RawCode](https://quittio.dev/docs/api/Quittio/Core/Codes/RawCode)\|string\|null` = `null` | |
| `$reason` | `array<string, string>\|string\|null` = `null` | |

<dl><dt>Returns</dt>
<dd><code>self</code></dd>
</dl>

### `rate()`#

```
public function rate(): ?BigDecimal
```

<dl><dt>Returns</dt>
<dd><code>?Brick\Math\BigDecimal</code></dd>
</dl>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/#website","@type":"WebSite","description":"E-Rechnungen für PHP und Laravel: ZUGFeRD, XRechnung und Peppol erstellen, prüfen, lesen und archivieren.","inLanguage":"de-DE","name":"Quittio","url":"https://quittio.dev/","publisher":{"@id":"https://quittio.dev/#identity"},"workTranslation":{"@id":"https://quittio.dev/en#website"}},{"@id":"https://quittio.dev/docs/api/Quittio/Core/Tax/CustomTaxPreset#webpage","@type":"WebPage","description":"Ad-hoc tax preset, e.g. for an exemption with a specific legal reference.","name":"CustomTaxPreset – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Tax/CustomTaxPreset","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Tax/CustomTaxPreset"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"de-DE","url":"https://quittio.dev/logo.png"}]}
```