API reference / Quittio \ Core \ Xml \ Cii
CiiWriter
final class in quittio/core · implements XmlSerializer
Quittio\Core\Xml\Cii\CiiWriter · Source
Writes UN/CEFACT Cross Industry Invoice (D16B) according to the EN 16931 binding (CEN/TS 16931-3-3) and the Factur-X/ZUGFeRD profiles.
The element order follows the XSD sequences. Fields that the profile does not contain are omitted (the field matrix validation reports them as warnings).
Constants#
| Constant | Value | Description |
|---|---|---|
NS_QDT | 'urn:un:unece:uncefact:data:standard:QualifiedDataType:100' | |
NS_RAM | 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100' | |
NS_RSM | 'urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100' | |
NS_UDT | 'urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100' |
Methods#
| Method | Description |
|---|---|
->serialize() | Writes the invoice as a CII D16B document for $profile; fields the profile does not contain are left out. Throws CalculationException if the invoice is not calculated. |
->syntax() | Always Syntax::Cii. |
serialize()#
public function serialize(
InvoiceData $invoice,
Profile $profile,
SerializationOptions $options = new \Quittio\Core\Xml\SerializationOptions(),
): stringWrites the invoice as a CII D16B document for $profile; fields the profile does not contain are left out. Throws CalculationException if the invoice is not calculated.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$profile | Profile | |
$options | SerializationOptions = new \Quittio\Core\Xml\SerializationOptions() |
- Returns
string
syntax()#
public function syntax(): SyntaxAlways Syntax::Cii.
- Returns
Syntax