API reference / Quittio \ Country \ BE \ Support
EnterpriseNumber
final class in quittio/country-be
Quittio\Country\BE\Support\EnterpriseNumber · Source
The Belgian enterprise number (ondernemingsnummer, numéro d'entreprise) of the Crossroads Bank for Enterprises: ten digits, the last two 97 minus the first eight modulo 97. The VAT number is "BE" and the enterprise number; Peppol uses it with scheme 0208.
Constants#
| Constant | Value | Description |
|---|---|---|
SCHEME | '0208' | Electronic address scheme of the enterprise number. |
Methods#
| Method | Description |
|---|---|
::format() | The number in the usual notation "0123.456.749". |
::fromVatId() | The enterprise number of a Belgian VAT number ("BE0123456749"), or null for another value. |
::isValid() | Whether the value is an enterprise number with valid check digits. |
::normalize() | The ten digits of a number such as "0123.456.749", "BE 0123 456 749" or "123456749", or null. |
format()#
public static function format(string $value): stringThe number in the usual notation "0123.456.749".
| Parameter | Type | Description |
|---|---|---|
$value | string |
- Returns
string
fromVatId()#
public static function fromVatId(?string $vatId): ?stringThe enterprise number of a Belgian VAT number ("BE0123456749"), or null for another value.
| Parameter | Type | Description |
|---|---|---|
$vatId | ?string |
- Returns
?string
isValid()#
public static function isValid(string $value): boolWhether the value is an enterprise number with valid check digits.
| Parameter | Type | Description |
|---|---|---|
$value | string |
- Returns
bool
normalize()#
public static function normalize(string $value): ?stringThe ten digits of a number such as "0123.456.749", "BE 0123 456 749" or "123456749", or null.
| Parameter | Type | Description |
|---|---|---|
$value | string |
- Returns
?string