Zum Inhalt springen

API reference / Quittio \ Core \ Countries

CountryDefaults

final readonly class in quittio/core

Quittio\Core\Countries\CountryDefaults · Source

Defaults of a country.

Applied by the core: $locale (locale of a run that names none), $paper (paper size unless the presentation or the configuration sets one), $letterLayout (letter layout unless the presentation names one), $paymentQr (what the payment QR code type "auto" prints) and $vatPreset and $smallBusinessVatPreset (VAT of lines without one, see CountryDefaultVat). Informational metadata for applications, not applied by the core: $currency, $timezone, $profile and $requiredLocales.

Properties#

PropertyTypeDescription
$currency readonlystringusual currency of the country; an invoice names its own (BT-5)
$letterLayout readonlystring
$locale readonlystring
$paper readonlystring
$paymentQr readonlystringpayment QR code of the type "auto": girocode (the pack's generator, otherwise the EPC GiroCode), swiss-qr-bill or another type (the pack's generator, otherwise none) or none
$profile readonlystringusual profile of the country; the profile of a run comes from the call, the configuration, the format rules of the pack or the format
$requiredLocales readonlylist<string>languages an invoice must (also) be issued in; a run renders one locale
$smallBusinessVatPreset readonlystring|nullkey of that preset for invoices of small businesses (Meta::FLAG_SMALL_BUSINESS)
$timezone readonlystringtime zone of the country, e.g. as default for an application's issuers; invoices use their own (InvoiceBuilder::timezone(), default UTC)
$vatPreset readonlystring|nullkey of the preset of the pack for lines without VAT treatment, usually the standard rate

Methods#

MethodDescription
->__construct()

__construct()#

public function __construct(
    string $currency = 'EUR',
    string $timezone = 'UTC',
    string $locale = 'en',
    string $paper = 'A4',
    string $letterLayout = 'free',
    string $profile = 'en16931',
    list<string> $requiredLocales = [],
    string $paymentQr = 'girocode',
    string|null $vatPreset = null,
    string|null $smallBusinessVatPreset = null,
)
ParameterTypeDescription
$currencystring = 'EUR'usual currency of the country; an invoice names its own (BT-5)
$timezonestring = 'UTC'time zone of the country, e.g. as default for an application's issuers; invoices use their own (InvoiceBuilder::timezone(), default UTC)
$localestring = 'en'
$paperstring = 'A4'
$letterLayoutstring = 'free'
$profilestring = 'en16931'usual profile of the country; the profile of a run comes from the call, the configuration, the format rules of the pack or the format
$requiredLocaleslist<string> = []languages an invoice must (also) be issued in; a run renders one locale
$paymentQrstring = 'girocode'payment QR code of the type "auto": girocode (the pack's generator, otherwise the EPC GiroCode), swiss-qr-bill or another type (the pack's generator, otherwise none) or none
$vatPresetstring|null = nullkey of the preset of the pack for lines without VAT treatment, usually the standard rate
$smallBusinessVatPresetstring|null = nullkey of that preset for invoices of small businesses (Meta::FLAG_SMALL_BUSINESS)

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.