Portugal: Document Reference ID

Portugal has specific rules for references to the Commitment Document (Número do compromisso).

Use the DocumentReferenceExtension/LineID Extension to model the Commitment Document (Número do compromisso).

Use the DocumentReference element for references to other documents such as orders or billing references.

Elements

Order and Billing References

Use the following elements to model order and billing references:

ElementDescription
Invoice/InvoiceLine/DocumentReference/IDSpecify the document number.
Invoice/InvoiceLine/DocumentReference/ID @schemeIDUse one of the allowed values.

Commitment Document (Número do compromisso)

Use the following elements to model the Commitment Document (Número do compromisso):

ElementDescription
DocumentReference/UBLExtensions/UBLExtension/ExtensionContent/ DocumentReferenceExtension/LineIDThe line in the Commitment Document that you are referencing.
Invoice/InvoiceLine/DocumentReference/IDSpecify the referenced document's ID.
Invoice/InvoiceLine/DocumentReference/ID @schemeIDUse VRBL:PT:COMMITMENT

Restrictions

  • You must use one of the following values for the @schemeID attribute:
CodeDescription
CTOrder Number
IVBilling reference number
VRBL:PT:COMMITMENTCommitment Document Number (Número do compromisso)
  • If you are modeling a reference to the Commitment Document Number of the Commitment Document (Número do compromisso), you need to use the DocumentReferenceExtension. You must add a DocumentReference element that contains the reference. You must also specify VRBL:PT:COMMITMENT in the @schemeID attribute.

Example

Order and Billing References

The following example shows references to an order and a billing reference:

<ubl:Invoice>
    <!-- Code omitted for clarity -->
    <cac:InvoiceLine>
        <!-- Code omitted for clarity -->
        <cac:DocumentReference>
            <cbc:ID schemeID="CT">CT987654</cbc:ID>
        </cac:DocumentReference>
        <cac:DocumentReference>
            <cbc:ID schemeID="IV">INV987654</cbc:ID>
        </cac:DocumentReference>
        <!-- Code omitted for clarity -->

Commitment Document (Número do compromisso)

The following example shows a reference to the Commitment Document (Número do compromisso):

 <!-- Code omitted for clarity -->
        <cac:DocumentReference>
            <cec:UBLExtensions>
                <cec:UBLExtension>
                    <cec:ExtensionContent>
                        <vrbl:DocumentReferenceExtension>
                            <cbc:LineID>01</cbc:LineID>
                        </vrbl:DocumentReferenceExtension>
                    </cec:ExtensionContent>
                </cec:UBLExtension>
            </cec:UBLExtensions>
            <cbc:ID schemeID="VRBL:PT:COMMITMENT">12345678</cbc:ID>
            <cbc:IssueDate>2024-05-02</cbc:IssueDate>
        </cac:DocumentReference>
        <!-- Code omitted for clarity -->
    </cac:InvoiceLine>
    <!-- Code omitted for clarity -->
</ubl:Invoice>