Day 7: Fix Invalid or Missing InvoiceTypeCode in IRB XML #invoicetypecode #irbvalidation

SEO Title: Day 7: Fix Invalid or Missing InvoiceTypeCode in IRB XML #invoicetypecode #irbvalidation
Focus Keyphrase: IRB InvoiceTypeCode error
Meta Description: Learn how to fix the IRB e-invoice InvoiceTypeCode error in UBL XML. Use the correct code (like 01) to define the document type for successful submission.

IRBM Error: Invalid or Missing InvoiceTypeCode

One small missing tag can result in rejection by IRBM:


"InvoiceTypeCode is missing or invalid. Must follow MyInvois UBL format."

What This Error Means

IRBM expects your UBL XML to include a valid cbc:InvoiceTypeCode tag to describe the document type.

Valid IRB Invoice Type Codes

CodeDescription
01Invoice
02Credit Note
03Debit Note

Fix It in Laravel

When building your invoice XML:


$cbc = 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2';

$invoice->appendChild(
  $doc->createElementNS($cbc, 'cbc:InvoiceTypeCode', '01') // Standard invoice
);

Don’t Forget Version

IRBM also expects cbc:UBLVersionID and cbc:CustomizationID as part of the header:


$invoice->appendChild($doc->createElementNS($cbc, 'cbc:UBLVersionID', '2.1'));
$invoice->appendChild($doc->createElementNS($cbc, 'cbc:CustomizationID', 'MYINV1.0'));

Validation Checklist

  • ✔ InvoiceTypeCode is one of: 01, 02, 03
  • ✔ UBLVersionID = 2.1
  • ✔ CustomizationID = MYINV1.0

Debug Tip

If IRBM doesn’t recognize your document, check that InvoiceTypeCode is one of the expected values, and is not missing or placed after required tags like cbc:ID.

Coming Up in Day 8

We’ll fix issues related to PayableAmount mismatches — where your invoice total doesn’t add up due to miscalculated tax or missing precision.


Tags: #IRBIntegration #InvoiceTypeCode #UBLXML #MyInvois #LaravelUBL

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.