Portugal B2G: Document Reference ID
Portugal has specific rules for references to the Commitment Document (Número do compromisso).
You use different elements for different references.
Elements
Order and Billing References
Use the following subelements of the DocumentReference element to model order and billing references:
Element | Description |
---|---|
Invoice/InvoiceLine/DocumentReference/ID | Specify the document number. |
Invoice/InvoiceLine/DocumentReference/ID @schemeID | Use one of the allowed values. |
Commitment Document (Número do compromisso)
Use the DocumentReferenceExtension (Extn) Extension to model the Commitment Document (Número do compromisso):
Element | Description |
---|---|
Document Reference Extension Group (DocumentReference/UBLExtensions/UBLExtension/ExtensionContent/ DocumentReferenceExtension/ ) | Groups extended document reference information. |
Line ID (DocumentReference/UBLExtensions/UBLExtension/ExtensionContent/ DocumentReferenceExtension/LineID ) | The line in the Commitment Document that you are referencing. |
ID (Invoice/InvoiceLine/DocumentReference/ID ) | Specify the referenced document's ID. |
Scheme Identifier (Invoice/InvoiceLine/DocumentReference/ID @schemeID ) | Use VRBL:PT:COMMITMENT . |
Restrictions
- You must use one of the following values for the
@schemeID
attribute: - If you are modelling a reference to the Commitment Document Number of the Commitment Document (Número do compromisso), you need to use the
DocumentReferenceExtension
. You must add aDocumentReference
element that contains the reference. You must also specifyVRBL:PT:COMMITMENT
in the@schemeID
attribute.
Code | Description |
---|---|
CT | Order Number |
IV | Billing reference number |
VRBL:PT:COMMITMENT | Commitment Document Number (Número do compromisso) |
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>
Updated 10 days ago