Document- and Line-Level Elements
Elements can be defined at the Document or Line level or both.
Elements and Extensions can be defined on the Document or Line level, depending on requirements and use cases. Some can be defined at both levels, like Allowances. However, some, like item classification must be specified at the line level. Some countries might require that you place specific information at a specific level. These are mentioned in the Country Guide Overview section.
Document-level
Document level means the element is in the top level of the Invoice element. This code snippet shows some Document level elements:
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:vrbl="urn:vertexinc:vrbl:ExtensionComponent:1">
<!-- Original specification MY: MyInvois: https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-0/ -->
<!-- Required UBL extensions -->
<cec:UBLExtensions>
<cec:UBLExtension>
<cec:ExtensionContent>
<vrbl:InvoiceExtension>
<vrbl:RoutingDetails>
<!-- Unique sender ID. In case of Malaysia always the sender's VAT ID -->
<vrbl:Sender>C2584563222</vrbl:Sender>
<!-- Unique receiver ID. In case of Malaysia always a static value identifies the country (Malaysia) and the target version to be created -->
<vrbl:Receiver>GENERIC_MY_MYINVOIS_1p0p0</vrbl:Receiver>
</vrbl:RoutingDetails>
</vrbl:InvoiceExtension>
</cec:ExtensionContent>
</cec:UBLExtension>
</cec:UBLExtensions>
<cbc:CustomizationID>urn:vertexinc:vrbl:billing:1</cbc:CustomizationID>
<cbc:ProfileID>urn:vertexinc:vrbl:billing:1</cbc:ProfileID>
<cbc:ID>INV12345</cbc:ID>
<cbc:IssueDate>2024-11-26</cbc:IssueDate>
<cbc:IssueTime>15:30:00Z</cbc:IssueTime>
<!-- MY: Invoice type code list: https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/ (mandatory) -->
<!-- MY codes are not UNTDID 1001 compliant -->
<!-- Original code: 01 - Invoice -->
<!-- Expected code: VRBL:MY:01 - Invoice -->
<cbc:InvoiceTypeCode>VRBL:MY:01</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>MYR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>buyer_ref_number234</cbc:BuyerReference>
<cac:InvoicePeriod>
<cbc:StartDate>2024-11-26</cbc:StartDate>
<cbc:EndDate>2024-11-30</cbc:EndDate>
<cbc:Description>Monthly</cbc:Description>
</cac:InvoicePeriod>
<cac:OrderReference>
Some examples are listed in the Document-Level Elements topic.
Invoice-level
Invoice lines are specified in the InvoiceLine element. See Invoice Lines. For example:
<cac:InvoiceLine>
<cbc:ID>0001</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="MYR">2925.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>Sample Description</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>0.15</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="MYR">225</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>Sample Description</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>0.10</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="MYR">150</cbc:Amount>
</cac:AllowanceCharge>
Some examples are listed in the Line-Level Elements topic.
In this section
This section contains the following topics:
Topic | Description |
---|---|
Document-Level Elements | Read a list of elements that can be specified at the Document-level. |
Line-Level Elements | Read a list of elements that can be specified at the Line-level. |
Updated 1 day ago