Error in invoice type code in Standard credit note

While trying to clear a standard credit note of one of our customers, the customer is getting this error.

The invoice transaction code (KSA-2) must exist and respect the following structure: NNPNESB where NN (positions 1 and 2) = invoice
subtype: 01 for tax invoice 02 for simplified tax invoice P
(position 3) = 3rd Party invoice transaction, 0 for false, 1 for true N
(position 4) = Nominal invoice transaction, 0 for false, 1 for true E
(position 5) = Exports invoice transaction, 0 for false, 1 for true S
(position 6) = Summary invoice transaction, 0 for false, 1 for true B
(position 7) = Self billed invoice.

The actual cause of the error is unknown. Please help with this.
The related xml is given below.

<?xml version="1.0" encoding="UTF-8"?>


<cbc:UBLVersionID xmlns=β€œβ€>2.1</cbc:UBLVersionID>
<cbc:ProfileID xmlns=β€œβ€>reporting:1.0</cbc:ProfileID>
<cbc:ID xmlns=β€œβ€>SR/1/202410/000016</cbc:ID>
<cbc:UUID xmlns=β€œβ€>2d72c9ff-bca3-4225-a29d-c03f13cb2828</cbc:UUID>
<cbc:IssueDate xmlns=β€œβ€>2024-10-29</cbc:IssueDate>
<cbc:IssueTime xmlns=β€œβ€>01:20:31</cbc:IssueTime>
<cbc:InvoiceTypeCode xmlns=β€œβ€ name=β€œ0100000 β€œ>381</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode xmlns=””>SAR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode xmlns=β€œβ€>SAR</cbc:TaxCurrencyCode>
<cac:BillingReference xmlns=β€œβ€>
cac:InvoiceDocumentReference
cbc:IDSRD/202410/000012</cbc:ID>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
<cac:AdditionalDocumentReference xmlns=β€œβ€>
cbc:IDICV</cbc:ID>
cbc:UUID44</cbc:UUID>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference xmlns=β€œβ€>
cbc:IDPIH</cbc:ID>
cac:Attachment
<cbc:EmbeddedDocumentBinaryObject mimeCode=β€œtext/plain”>BTOI42b0iHlCFancWCKroHZOWVg3M2hIttEBoM+79+E=</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AccountingSupplierParty xmlns=β€œβ€>
cac:Party
cac:PartyIdentification
<cbc:ID schemeID=β€œCRN”>null</cbc:ID>
</cac:PartyIdentification>
cac:PostalAddress
cbc:StreetNameZaid Ibn Al Khattab </cbc:StreetName>
cbc:BuildingNumber7580</cbc:BuildingNumber>
cbc:CitySubdivisionNameAl Olya</cbc:CitySubdivisionName>
cbc:CityNameAl Khobar </cbc:CityName>
cbc:PostalZone34447</cbc:PostalZone>
cac:Country
cbc:IdentificationCodeSA</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
cac:PartyTaxScheme
cbc:CompanyID310903726100003</cbc:CompanyID>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
cac:PartyLegalEntity
cbc:RegistrationNameMass Vision Trading </cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty xmlns=β€œβ€>
cac:Party
cac:PartyTaxScheme
cbc:CompanyID300000432310003</cbc:CompanyID>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
cac:PartyLegalEntity
cbc:RegistrationNameSaudi Arabian Oil Company</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans xmlns=β€œβ€>
cbc:PaymentMeansCode1</cbc:PaymentMeansCode>
cbc:InstructionNotereturn</cbc:InstructionNote>
</cac:PaymentMeans>
<cac:TaxTotal xmlns=β€œβ€>
<cbc:TaxAmount currencyID=β€œSAR”>28.37</cbc:TaxAmount>
</cac:TaxTotal>
<cac:TaxTotal xmlns=β€œβ€>
<cbc:TaxAmount currencyID=β€œSAR”>28.37</cbc:TaxAmount>
cac:TaxSubtotal
<cbc:TaxableAmount currencyID=β€œSAR”>189.12</cbc:TaxableAmount>
<cbc:TaxAmount currencyID=β€œSAR”>28.37</cbc:TaxAmount>
cac:TaxCategory
<cbc:ID schemeAgencyID=β€œ6” schemeID=β€œUN/ECE 5305”>S</cbc:ID>
cbc:Percent15.0</cbc:Percent>
cac:TaxScheme
<cbc:ID schemeAgencyID=β€œ6” schemeID=β€œUN/ECE 5153”>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal xmlns=β€œβ€>
<cbc:LineExtensionAmount currencyID=β€œSAR”>189.12</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID=β€œSAR”>189.12</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID=β€œSAR”>217.49</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID=β€œSAR”>0.0</cbc:AllowanceTotalAmount>
<cbc:ChargeTotalAmount currencyID=β€œSAR”>0.0</cbc:ChargeTotalAmount>
<cbc:PrepaidAmount currencyID=β€œSAR”>0.0</cbc:PrepaidAmount>
<cbc:PayableRoundingAmount currencyID=β€œSAR”>0.0</cbc:PayableRoundingAmount>
<cbc:PayableAmount currencyID=β€œSAR”>217.49</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine xmlns=β€œβ€>
cbc:ID1</cbc:ID>
<cbc:InvoicedQuantity unitCode=β€œPCE”>1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID=β€œSAR”>189.12</cbc:LineExtensionAmount>
cac:TaxTotal
<cbc:TaxAmount currencyID=β€œSAR”>28.37</cbc:TaxAmount>
<cbc:RoundingAmount currencyID=β€œSAR”>217.49</cbc:RoundingAmount>
</cac:TaxTotal>
cac:Item
cbc:NameTable </cbc:Name>
cac:ClassifiedTaxCategory
cbc:IDS</cbc:ID>
cbc:Percent15.0</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
cac:Price
<cbc:PriceAmount currencyID=β€œSAR”>189.12</cbc:PriceAmount>
cac:AllowanceCharge
cbc:ChargeIndicatortrue</cbc:ChargeIndicator>
cbc:AllowanceChargeReasondiscount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID=β€œSAR”>0.0</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>

Dear @itujar_it

Thanks for reaching out,

Can I kindly ask you to share the XML in the same form that you are sending it and giving you the above error?

If you can send it via mail, will be more helpful to ensure comprehensive support as usual, you can find SP support email below.

SP mail: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud.

1 Like

thanx for your response. xml Shared by mail.