Skip to content

[Docs D-20] Reference — Ublv24 generator options #85

Description

@nielsdrost7

Wiki section: Reference
Tier: 3 — Reference
Publish when: InvoicePlane v1.8.0 is released

The Ublv24Xml generator (application/libraries/XMLtemplates/Ublv24Xml.php) handles all UBL-based formats: UBL.BE, SI-UBL, CIUS-RO, CIUS-PT, and XRechnung UBL. Behaviour is controlled by the options array in each config file.


Full options reference

CustomizationID

Type: string

The CIUS identifier placed in cbc:CustomizationID. Identifies which national standard the invoice conforms to.

'CustomizationID' => 'urn:cen.eu:en16931:2017#conformant#urn:UBL.BE:1.0.0.20180214',

ProfileID

Type: string | Default: urn:fdc:peppol.eu:2017:poacc:billing:01:1.0

Placed in cbc:ProfileID. Leave unset for the standard Peppol billing profile.

BuyerReference

Type: bool | Default: false

When true, includes cbc:BuyerReference in the invoice. Required by most CIUS variants. The value is read from invoice_routing_code_1 in ip_invoice_meta when present, otherwise falls back to order reference.

Delivery

Type: bool | Default: false

When true, includes a cac:Delivery block with the delivery address (client address fields).

EndpointID

Type: string | Values: vat_id, tax_code

Which InvoicePlane field to use as the endpoint identifier value in cbc:EndpointID. The schemeID attribute is set by client_eas_code / user_eas_code.

client_eas_code / user_eas_code

Type: string

EAS code for the buyer (client) and seller (user) endpoint identifiers. Used as schemeID on cbc:EndpointID. See EAS code reference for valid values.

'client_eas_code' => '0208',
'user_eas_code'   => '0208',

PartyIdentification

Type: bool | string | Default: false

When truthy, includes cac:PartyIdentification/cbc:ID for both buyer and seller. Set to false to suppress this element (required by some CIUS variants that use PartyLegalEntity instead).

PartyLegalEntity

Type: array

Controls cac:PartyLegalEntity/cbc:CompanyID. Keys:

Key Type Description
CompanyID string Which IP field to use: tax_code, vat_id
SchemeID bool Whether to include a schemeID attribute
'PartyLegalEntity' => ['CompanyID' => 'tax_code', 'SchemeID' => false],

DocumentReference

Type: array of [ID, Description] tuples

Adds cac:AdditionalDocumentReference elements. Required by UBL.BE (rule ubl-BE-01 requires exactly two).

'DocumentReference' => [
    ['UBL.BE', 'UBL.BE Compatible software Version 5.21'],
    ['url', ['CommercialInvoice', 'CreditNote']],
],

TaxName

Type: array — rate% => [code, exemptionReason?]

Maps VAT rate percentages to cbc:Name classification codes. Required by Belgian CIUS (rule ubl-BE-15).

'TaxName' => [
    21 => ['03'],
    12 => ['02'],
    6  => ['01'],
    0  => ['NS', 'BETE-NS'],
],

InvoiceLineTaxTotal

Type: bool | Default: false

When true, includes a cac:TaxTotal block on each invoice line in addition to the document-level tax total. Required by some CIUS variants.

NoPaymentMeansName

Type: bool | Default: false

When true, suppresses the payment means code text name. Required by SI-UBL (Netherlands).

NoReasonCode

Type: bool | Default: false

When true, suppresses cbc:AllowanceChargeReasonCode elements on allowances and charges. Required by NLCIUS and SI-UBL.


Minimal working config example

$xml_setting = [
    'full-name'   => 'My Country UBL 1.0',
    'countrycode' => 'XX',
    'embedXML'    => false,
    'XMLname'     => '',
    'generator'   => 'Ublv24',
    'options'     => [
        'CustomizationID'  => 'urn:cen.eu:en16931:2017#compliant#urn:mycountry:1.0',
        'BuyerReference'   => true,
        'client_eas_code'  => '9999',
        'user_eas_code'    => '9999',
        'EndpointID'       => 'vat_id',
        'PartyLegalEntity' => ['CompanyID' => 'vat_id', 'SchemeID' => false],
    ],
];

Migrated from InvoicePlane/InvoicePlane-e-invoices#44.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions