CountryPack
in
Everything that differs between countries.
A country pack may only add or tighten rules; it never relaxes EN 16931 rules.
Table of Contents
Methods
- addressFormatter() : AddressFormatter
- Formats postal addresses by the conventions of the country, e.g. for the address window.
- buyerCountryRules() : array<int, Rule>
- Rules applied when the pack's country is the buyer's country of a cross-border invoice.
- code() : string
- ISO 3166-1 alpha-2 code, e.g. "DE".
- correctionPolicy() : CorrectionPolicy
- Cancellation and correction strategies and titles; see CorrectionPolicy for who uses what.
- defaults() : CountryDefaults
- Defaults of the country: locale, paper, letter layout, payment QR code and default VAT presets, plus informational values (currency, time zone, profile); see CountryDefaults.
- dunningLaw() : DunningLaw
- Statutory late payment rules. Informational metadata for applications, e.g. to compute fees and default interest for DocumentBuilder::fee() and interest(); the core does not apply them.
- exporters() : array<int, Exporter>
- Export formats the pack declares (e.g. DATEV). Informational metadata for applications; Quittio runs no exporter.
- formatRules() : array<int, FormatRule>
- Format choice for domestic invoices.
- legalTexts() : LegalTextCatalog
- Legal and informational texts of the country by key and locale. Informational metadata for applications and the pack's own presets and rules; the core adds none of them to an invoice by itself.
- letterLayouts() : array<string, LetterLayout>
- Letter layouts by name (e.g. din5008a, din5008b); CountryDefaults::$letterLayout selects the default.
- mandatoryOutput() : MandatoryFieldList
- Values that the PDF of $invoice must show by law; the mandatory field guard checks that the template printed them.
- numberingRules() : NumberingRules
- Numbering requirements; the Managed layer applies pattern and resets (see NumberingRules).
- paymentQr() : PaymentQrGenerator|null
- Payment QR code generator of the country, used for the type "auto" unless CountryDefaults::$paymentQr is "none" (an application's generator registered with Quittio::setPaymentQrGenerator() comes first); null = the EPC GiroCode for "girocode".
- profiles() : array<int, Profile>
- National profiles, e.g. XRechnung.
- readers() : array<int, FormatReader>
- Readers for national formats. Quittio::read() and validateFile() try them after the CII and UBL readers, for every registered pack; return new instances on every call (readers keep the state of one document).
- retention() : RetentionRule
- Retention period of issued invoices; the Managed layer stores the end of it.
- rules() : array<int, Rule>
- Additional validation rules (L3) applied when the pack is the leading pack.
- taxPresets() : TaxPresetCollection
- Tax presets of the country by key (e.g. "de.small_business"). Informational metadata for applications, e.g. to offer them in a form or to resolve a stored LineVat::$presetKey; the core does not apply it: lines take a preset with LineBuilder::vat().
- translationPath() : string|null
- Directory with translation files ({locale}/{group}.php) of the pack, if any.
Methods
addressFormatter()
Formats postal addresses by the conventions of the country, e.g. for the address window.
public
addressFormatter() : AddressFormatter
Return values
AddressFormatterbuyerCountryRules()
Rules applied when the pack's country is the buyer's country of a cross-border invoice.
public
buyerCountryRules() : array<int, Rule>
Return values
array<int, Rule>code()
ISO 3166-1 alpha-2 code, e.g. "DE".
public
code() : string
Return values
stringcorrectionPolicy()
Cancellation and correction strategies and titles; see CorrectionPolicy for who uses what.
public
correctionPolicy() : CorrectionPolicy
Return values
CorrectionPolicydefaults()
Defaults of the country: locale, paper, letter layout, payment QR code and default VAT presets, plus informational values (currency, time zone, profile); see CountryDefaults.
public
defaults() : CountryDefaults
Return values
CountryDefaultsdunningLaw()
Statutory late payment rules. Informational metadata for applications, e.g. to compute fees and default interest for DocumentBuilder::fee() and interest(); the core does not apply them.
public
dunningLaw() : DunningLaw
Return values
DunningLawexporters()
Export formats the pack declares (e.g. DATEV). Informational metadata for applications; Quittio runs no exporter.
public
exporters() : array<int, Exporter>
Return values
array<int, Exporter>formatRules()
Format choice for domestic invoices.
public
formatRules() : array<int, FormatRule>
Return values
array<int, FormatRule>legalTexts()
Legal and informational texts of the country by key and locale. Informational metadata for applications and the pack's own presets and rules; the core adds none of them to an invoice by itself.
public
legalTexts() : LegalTextCatalog
Return values
LegalTextCatalogletterLayouts()
Letter layouts by name (e.g. din5008a, din5008b); CountryDefaults::$letterLayout selects the default.
public
letterLayouts() : array<string, LetterLayout>
Return values
array<string, LetterLayout>mandatoryOutput()
Values that the PDF of $invoice must show by law; the mandatory field guard checks that the template printed them.
public
mandatoryOutput(InvoiceData $invoice) : MandatoryFieldList
Parameters
- $invoice : InvoiceData
Return values
MandatoryFieldListnumberingRules()
Numbering requirements; the Managed layer applies pattern and resets (see NumberingRules).
public
numberingRules() : NumberingRules
Return values
NumberingRulespaymentQr()
Payment QR code generator of the country, used for the type "auto" unless CountryDefaults::$paymentQr is "none" (an application's generator registered with Quittio::setPaymentQrGenerator() comes first); null = the EPC GiroCode for "girocode".
public
paymentQr() : PaymentQrGenerator|null
Return values
PaymentQrGenerator|nullprofiles()
National profiles, e.g. XRechnung.
public
profiles() : array<int, Profile>
Return values
array<int, Profile>readers()
Readers for national formats. Quittio::read() and validateFile() try them after the CII and UBL readers, for every registered pack; return new instances on every call (readers keep the state of one document).
public
readers() : array<int, FormatReader>
Return values
array<int, FormatReader>retention()
Retention period of issued invoices; the Managed layer stores the end of it.
public
retention() : RetentionRule
Return values
RetentionRulerules()
Additional validation rules (L3) applied when the pack is the leading pack.
public
rules() : array<int, Rule>
Return values
array<int, Rule>taxPresets()
Tax presets of the country by key (e.g. "de.small_business"). Informational metadata for applications, e.g. to offer them in a form or to resolve a stored LineVat::$presetKey; the core does not apply it: lines take a preset with LineBuilder::vat().
public
taxPresets() : TaxPresetCollection
Return values
TaxPresetCollectiontranslationPath()
Directory with translation files ({locale}/{group}.php) of the pack, if any.
public
translationPath() : string|null