Skip to content

API reference / Quittio \ Country \ DE \ Support

LeitwegId

final class in quittio/country-de

Quittio\Country\DE\Support\LeitwegId · Source

Leitweg-ID of public buyers in Germany (BT-10 for XRechnung): coarse address (2–12 digits), optional fine address (up to 30 characters) and check digits according to ISO 7064 Mod 97-10.

Methods#

MethodDescription
::checkDigits()The two check digits (ISO 7064 MOD 97-10) of a Leitweg-ID, computed over the coarse and the fine address concatenated without the dash, e.g. checkDigits('04011000'.'1234512345').
::isValid()Whether the value is a Leitweg-ID with correct check digits.
::looksLike()Whether the value has the shape of a Leitweg-ID (coarse address, optional fine address, two check digits, separated by dashes), whatever its check digits.

checkDigits()#

public static function checkDigits(string $address): string

static

The two check digits (ISO 7064 MOD 97-10) of a Leitweg-ID, computed over the coarse and the fine address concatenated without the dash, e.g. checkDigits('04011000'.'1234512345').

ParameterTypeDescription
$addressstring
Returns
string

isValid()#

public static function isValid(?string $value): bool

static

Whether the value is a Leitweg-ID with correct check digits.

ParameterTypeDescription
$value?string
Returns
bool

looksLike()#

public static function looksLike(?string $value): bool

static

Whether the value has the shape of a Leitweg-ID (coarse address, optional fine address, two check digits, separated by dashes), whatever its check digits.

ParameterTypeDescription
$value?string
Returns
bool

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.