All rules · pint-om · error

IBR-079-OM

The document must not contain empty elements.

Reviewed

Why this rule exists

An empty element asserts that a value exists while providing none. That is worse than omitting the element, because downstream systems treat presence as meaning.

Why it usually happens

How to fix it

Configure the serializer to omit elements whose value is null or empty, rather than emitting empty tags.

Wrong
<cbc:Note></cbc:Note>
Right
<!-- omit the element entirely when there is no note -->

The official rule

When Goods or Services identification (BTOM-019) is 'Goods' then Item classification identifier (IBT-158, HS code) must be provided except when Invoice transaction type (BTOM-001) is 'Simplified Tax Invoice' (01000000000000000000)

Verbatim from the published artefact. We execute the official Schematron unmodified, so this is exactly what an Access Point checks.

Schematron test

$isSimplified                   or not(cac:Item/cac:ItemSpecificationDocumentReference[cbc:ID/@schemeName='MP']/cbc:DocumentTypeCode='G')                   or cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode[@listID='HS']

Applied to nodes matching cac:InvoiceLine | cac:CreditNoteLine

Rule-pack versions

Rule-packLayerSeverityApplies to
pint-om-1.0.1pint-omerrorbilling/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice
pint-om-1.0.0pint-omerrorbilling/creditnote, billing/invoice, self-billing/creditnote, self-billing/invoice

Check your own invoice

Paste your XML and see every rule that fires, not just this one. Free, no sign-up, and we never store the document.

Open the validator
IBR-079-OM — The document must not contain empty elements. · PINT Probe