Zum Inhalt springen

API reference / Quittio \ Core \ Codes

CodeListGenerator

final class in quittio/core

Quittio\Core\Codes\CodeListGenerator · Source

Generates the code list files (resources/codelists/*.json) from the official EN 16931 Schematron rules (BR-CL-*), as shipped with the KoSIT validator configuration, and the narrower Peppol lists from the Peppol BIS Schematron.

Constants#

ConstantValueDescription
LISTS['BR-CL-01' => 'invoice-type-codes', 'BR-CL-03' => 'currency-codes', 'BR-CL-06' => 'tax-point-date-codes-cii', 'BR-CL-07' => 'object-identifier-schemes', 'BR-CL …Rule codes and the code list names used by the package.
PEPPOL_LISTS[\Quittio\Core\Codes\CodeList::PEPPOL_EAS => 'PEPPOL-EN16931-CL008', \Quittio\Core\Codes\CodeList::PEPPOL_CURRENCIES => 'PEPPOL-EN16931-CL007', \Quittio\Core\Co …Code list names and the Peppol rules they are generated from (generatePeppol()).

Methods#

MethodDescription
::defaultTarget()
->generate()
->generatePeppol()Generates the Peppol code lists (PEPPOL-EN16931-CL…, P01…) that are narrower than the EN 16931 lists, from the Peppol BIS Billing 3.0 Schematron (PEPPOL-EN16931-UBL.sch). The codes are read from the assertion of the rule: an inline tokenize('…') or the variable (<let>) the assertion refers to.

defaultTarget()#

public static function defaultTarget(): string

static

Returns
string

generate()#

public function generate(string $xslPath, ?string $target = null): array<string, int>
ParameterTypeDescription
$xslPathstring
$target?string = null
Returns
array<string, int> – code list name => number of codes

generatePeppol()#

public function generatePeppol(
    string $schematronPath,
    ?string $target = null,
): array<string, int>

Generates the Peppol code lists (PEPPOL-EN16931-CL…, P01…) that are narrower than the EN 16931 lists, from the Peppol BIS Billing 3.0 Schematron (PEPPOL-EN16931-UBL.sch). The codes are read from the assertion of the rule: an inline tokenize('…') or the variable (<let>) the assertion refers to.

ParameterTypeDescription
$schematronPathstring
$target?string = null
Returns
array<string, int> – code list name => number of codes

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