---
title: "Meta – API-Referenz · Quittio"
description: "Package-internal metadata: locale, time zone, exchange rate, free data for templates and flags for country packs."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Data/Meta"
locale: de
meta:
  "og:description": "Package-internal metadata: locale, time zone, exchange rate, free data for templates and flags for country packs."
  "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": "Meta – 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) \\ [Data](https://quittio.dev/docs/api/Quittio/Core/Data)

# Meta

final readonly class in quittio/core · uses [`Immutable`](https://quittio.dev/docs/api/Quittio/Core/Data/Concerns/Immutable)

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

Package-internal metadata: locale, time zone, exchange rate, free data for templates and flags for country packs.

The flags of the declared amounts (FLAG\_DECLARED\_AMOUNTS, FLAG\_DECLARED\_AMOUNTS\_RECALCULATED, FLAG\_CANCELLATION\_VAT\_ALIGNED, amountsFingerprint(), declaredVatInTaxCurrency()) are their stored format; Quittio reads and writes them together as Calculation\\DeclaredAmountsState.

## Constants \#

| Constant | Value | Description |
| --- | --- | --- |
| `FLAG_CANCELLATION_VAT_ALIGNED` | `'cancellation_vat_aligned'` | A partial cancellation whose VAT (BT-117, BT-111) is aligned with the earlier partial cancellations of the original (Corrections\\CancellationHistory), in gross price mode also its taxable amounts (BT-116): a VAT amount may differ from round2(taxable amount × rate) by a cent, reported as QUITTIO-CANCELLATION-VAT-ALIGNED instead of QUITTIO-VAT-ROUNDING (which still reports larger differences and a sign other than that of the taxable amount). Dropped once amounts change. |
| `FLAG_DECLARED_AMOUNTS` | `'declared_amounts'` | The line net amounts (BT-131) and the VAT breakdown (BT-116, BT-117) of the data are the declared amounts of an existing document that another system rounded differently, e.g. of a cancellation or of data started with InvoiceBuilder::from() whose amounts were not changed. Set by the builder only, and only if the recalculation does not reproduce the declared amounts, together with the fingerprint of the amount inputs (amountsFingerprint()). The calculator keeps declared BT-131 within 0.02 of quantity × price ± allowances and charges (PEPPOL-EN16931-R120) and declared BT-117 within less than one currency unit (BR-CO-17), so that foreign rounding is reversed exactly; once the amount inputs no longer match the fingerprint (e.g. changed with with() or in stored JSON), everything is recalculated. |
| `FLAG_DECLARED_AMOUNTS_RECALCULATED` | `'declared_amounts_recalculated'` | Set by the calculator when declared amounts could not be kept (QUITTIO-DECLARED-AMOUNTS). |
| `FLAG_PRICE_REDUCTION` | `'price_reduction'` | A document on the reduction of the consideration of an invoice (Corrections\\PriceReduction, section 17 UStG), not a cancellation or correction of it. |
| `FLAG_SMALL_BUSINESS` | `'small_business'` | The seller applies a small business scheme and must not charge VAT (DE: section 19 UStG). |

## Properties \#

| Property | Type | Description |
| --- | --- | --- |
| `$custom` readonly | `array<string, mixed>` | |
| `$exchangeRate` readonly | `?Brick\Math\BigDecimal` | |
| `$exchangeRateDate` readonly | `? [Date](https://quittio.dev/docs/api/Quittio/Core/Support/Date)` | |
| `$flags` readonly | `list<string>` | |
| `$locale` readonly | `?string` | |
| `$source` readonly | `?string` | |
| `$timezone` readonly | `?string` | |

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `->amountsFingerprint()` | Fingerprint of the amount inputs (Calculation\\DeclaredAmounts) for which the line net amounts and the VAT breakdown of the data were calculated or declared; set by the calculator and the builder. Data whose inputs no longer match was changed afterwards (e.g. with with() or in stored JSON): its amounts are stale. Stored as a flag, so that it survives toArray(). |
| `->declaredVatInTaxCurrency()` | Declared VAT total in accounting currency (BT-111) that belongs to the declared amounts (FLAG\_DECLARED\_AMOUNTS), e.g. of a partial cancellation whose VAT is aligned with the earlier ones: the calculator keeps it within 0.01 of round2(BT-110 × exchange rate). Data built with InvoiceBuilder has no totals, so it is stored as a flag, like the fingerprint. |
| `->hasFlag()` | |
| `->with()` | Returns a copy with the given properties replaced. |
| `->withAmountsFingerprint()` | |
| `->withDeclaredVatInTaxCurrency()` | |
| `->withFlag()` | |

### `__construct()`#

```
public function __construct(
    ?string $locale = null,
    ?string $timezone = null,
    ?BigDecimal $exchangeRate = null,
    ?Date $exchangeRateDate = null,
    array<string, mixed> $custom = [],
    ?string $source = null,
    list<string> $flags = [],
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$locale` | `?string` = `null` | |
| `$timezone` | `?string` = `null` | |
| `$exchangeRate` | `?Brick\Math\BigDecimal` = `null` | |
| `$exchangeRateDate` | `? [Date](https://quittio.dev/docs/api/Quittio/Core/Support/Date)` = `null` | |
| `$custom` | `array<string, mixed>` = `[]` | |
| `$source` | `?string` = `null` | |
| `$flags` | `list<string>` = `[]` | |

### `amountsFingerprint()`#

```
public function amountsFingerprint(): ?string
```

Fingerprint of the amount inputs (Calculation\\DeclaredAmounts) for which the line net amounts and the VAT breakdown of the data were calculated or declared; set by the calculator and the builder. Data whose inputs no longer match was changed afterwards (e.g. with with() or in stored JSON): its amounts are stale. Stored as a flag, so that it survives toArray().

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

### `declaredVatInTaxCurrency()`#

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

Declared VAT total in accounting currency (BT-111) that belongs to the declared amounts (FLAG\_DECLARED\_AMOUNTS), e.g. of a partial cancellation whose VAT is aligned with the earlier ones: the calculator keeps it within 0.01 of round2(BT-110 × exchange rate). Data built with InvoiceBuilder has no totals, so it is stored as a flag, like the fingerprint.

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

### `hasFlag()`#

```
public function hasFlag(string $flag): bool
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$flag` | `string` | |

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

### `with()`#

```
public function with(array<string, mixed> $changes): static
```

Returns a copy with the given properties replaced.

| Parameter | Type | Description |
| --- | --- | --- |
| `$changes` | `array<string, mixed>` | |

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

### `withAmountsFingerprint()`#

```
public function withAmountsFingerprint(?string $fingerprint): self
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$fingerprint` | `?string` | |

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

### `withDeclaredVatInTaxCurrency()`#

```
public function withDeclaredVatInTaxCurrency(?BigDecimal $amount): self
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$amount` | `?Brick\Math\BigDecimal` | |

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

### `withFlag()`#

```
public function withFlag(string $flag, bool $enabled = true): self
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$flag` | `string` | |
| `$enabled` | `bool` = `true` | |

<dl><dt>Returns</dt>
<dd><code>self</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/Data/Meta#webpage","@type":"WebPage","description":"Package-internal metadata: locale, time zone, exchange rate, free data for templates and flags for country packs.","name":"Meta – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Data/Meta","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Data/Meta"]}],"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"}]}
```