id stringlengths 5 23 | severity stringclasses 2
values | source stringclasses 2
values | official_text stringlengths 55 977 | fails_when stringlengths 19 2.55k | en_title stringlengths 26 70 ⌀ | ar_title stringlengths 33 60 ⌀ | en_meaning stringlengths 72 639 ⌀ | en_fix stringlengths 51 335 ⌀ | ar_meaning stringlengths 85 627 ⌀ | ar_fix stringlengths 51 325 ⌀ | applies_to stringclasses 5
values | fields listlengths 0 12 ⌀ | url_en stringlengths 41 59 | url_ar stringlengths 31 49 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BR-02 | warning | EN 16931 (CEN) rules | [BR-02]-An Invoice shall have an Invoice number (BT-1). | not(exists(cbc:ID) and (cbc:ID) !='') | Every invoice needs an invoice number (BT-1) | يجب أن تحمل كل فاتورة رقم فاتورة (BT-1) | Checks that the document root (ubl:Invoice or cn:CreditNote) has a cbc:ID element and that it is not empty. | Add a non-empty invoice number directly under the root element, e.g. `<cbc:ID>INV-0001</cbc:ID>`. | تتحقق القاعدة من أن العنصر الجذر للمستند (ubl:Invoice أو cn:CreditNote) يحتوي على العنصر cbc:ID وأنه غير فارغ. | أضف رقم فاتورة غير فارغ مباشرة تحت العنصر الجذر، مثل `<cbc:ID>INV-0001</cbc:ID>`. | all | [
"BT-1"
] | https://matheel.app/en/zatca-errors/br-02 | https://matheel.app/akhta/br-02 |
BR-03 | error | EN 16931 (CEN) rules | [BR-03]-An Invoice shall have an Invoice issue date (BT-2). | not(exists(cbc:IssueDate) and (cbc:IssueDate) !='') | Every invoice needs an issue date (BT-2) | يجب أن تحمل كل فاتورة تاريخ إصدار (BT-2) | Checks that the document root has a cbc:IssueDate element and that it is not empty. | Add the issue date directly under the root element in the UBL date format YYYY-MM-DD, e.g. `<cbc:IssueDate>2026-10-24</cbc:IssueDate>`. | تتحقق القاعدة من أن العنصر الجذر للمستند يحتوي على العنصر cbc:IssueDate وأنه غير فارغ. | أضف تاريخ الإصدار مباشرة تحت العنصر الجذر بصيغة التاريخ في UBL (YYYY-MM-DD)، مثل `<cbc:IssueDate>2026-10-24</cbc:IssueDate>`. | all | [
"BT-2"
] | https://matheel.app/en/zatca-errors/br-03 | https://matheel.app/akhta/br-03 |
BR-04 | error | EN 16931 (CEN) rules | [BR-04]-An Invoice shall have an Invoice type code (BT-3). | not((exists(cbc:InvoiceTypeCode) and (cbc:InvoiceTypeCode) !='') or (exists(cbc:CreditNoteTypeCode) and (cbc:CreditNoteTypeCode) !='')) | Every invoice needs an invoice type code (BT-3) | يجب أن تحمل كل فاتورة رمز نوع الفاتورة (BT-3) | Checks that the document has a non-empty cbc:InvoiceTypeCode (or, in a cn:CreditNote document, a non-empty cbc:CreditNoteTypeCode). | Add a type code under the root element, e.g. `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>` as in the official samples; the value must also be in the BR-CL-01 code list. | تتحقق القاعدة من وجود العنصر cbc:InvoiceTypeCode غير فارغ (أو العنصر cbc:CreditNoteTypeCode غير فارغ في مستند من نوع cn:CreditNote). | أضف رمز النوع تحت العنصر الجذر، مثل `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>` كما في النماذج الرسمية، ويجب أن تكون القيمة ضمن قائمة الرموز في القاعدة BR-CL-01. | all | [
"BT-3"
] | https://matheel.app/en/zatca-errors/br-04 | https://matheel.app/akhta/br-04 |
BR-05 | error | EN 16931 (CEN) rules | [BR-05]-An Invoice shall have an Invoice currency code (BT-5). | not(exists(cbc:DocumentCurrencyCode) and (cbc:DocumentCurrencyCode) !='') | Every invoice needs a currency code (BT-5) | يجب أن تحمل كل فاتورة رمز عملة الفاتورة (BT-5) | Checks that the document root has a cbc:DocumentCurrencyCode element and that it is not empty. | Add the invoice currency under the root element, e.g. `<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>`; the value must be an ISO 4217 code (see BR-CL-04). | تتحقق القاعدة من أن العنصر الجذر يحتوي على العنصر cbc:DocumentCurrencyCode وأنه غير فارغ. | أضف عملة الفاتورة تحت العنصر الجذر، مثل `<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>`، ويجب أن تكون القيمة رمزًا من ISO 4217 (انظر BR-CL-04). | all | [
"BT-5"
] | https://matheel.app/en/zatca-errors/br-05 | https://matheel.app/akhta/br-05 |
BR-06 | warning | EN 16931 (CEN) rules | [BR-06]-An Invoice shall contain the Seller name (BT-27). | not(exists(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) and (cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) !='') | The seller's legal name (BT-27) must be present | يجب ذكر الاسم القانوني للبائع (BT-27) | Checks that cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName exists and is not empty. | Add the seller name: `<cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Seller name</cbc:RegistrationName></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty>`. | تتحقق القاعدة من وجود العنصر cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName وأنه غير فارغ. | أضف اسم البائع: `<cac:AccountingSupplierParty><cac:Party><cac:PartyLegalEntity><cbc:RegistrationName>Seller name</cbc:RegistrationName></cac:PartyLegalEntity></cac:Party></cac:AccountingSupplierParty>`. | all | [
"BT-27"
] | https://matheel.app/en/zatca-errors/br-06 | https://matheel.app/akhta/br-06 |
BR-08 | warning | EN 16931 (CEN) rules | [BR-08]-An Invoice shall contain the Seller postal address (BG-5) | not(exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) and count(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress) >0) | The seller's postal address (BG-5) must be present | يجب ذكر العنوان البريدي للبائع (BG-5) | Checks that the seller party has at least one cac:AccountingSupplierParty/cac:Party/cac:PostalAddress element. This rule only checks that the element exists, not what it contains. | Add a cac:PostalAddress inside cac:AccountingSupplierParty/cac:Party; its contents (such as the country code) are checked by other rules like BR-09. | تتحقق القاعدة من وجود عنصر cac:PostalAddress واحد على الأقل ضمن cac:AccountingSupplierParty/cac:Party. القاعدة تتحقق من وجود العنصر فقط، لا من محتواه. | أضف العنصر cac:PostalAddress داخل cac:AccountingSupplierParty/cac:Party؛ أما محتواه (مثل رمز الدولة) فتتحقق منه قواعد أخرى مثل BR-09. | all | [
"BG-5"
] | https://matheel.app/en/zatca-errors/br-08 | https://matheel.app/akhta/br-08 |
BR-09 | warning | EN 16931 (CEN) rules | [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). | not((cac:Country/cbc:IdentificationCode) != '') | The seller address must include a country code (BT-40) | يجب أن يتضمن عنوان البائع رمز الدولة (BT-40) | Checks that the seller's cac:PostalAddress contains cac:Country/cbc:IdentificationCode with a non-empty value. | Inside the seller's cac:PostalAddress add `<cac:Country><cbc:IdentificationCode>SA</cbc:IdentificationCode></cac:Country>` (or the seller's ISO 3166-1 country code, see BR-CL-14). | تتحقق القاعدة من أن العنصر cac:PostalAddress الخاص بالبائع يحتوي على cac:Country/cbc:IdentificationCode بقيمة غير فارغة. | داخل العنصر cac:PostalAddress الخاص بالبائع أضف `<cac:Country><cbc:IdentificationCode>SA</cbc:IdentificationCode></cac:Country>` (أو رمز دولة البائع وفق ISO 3166-1، انظر BR-CL-14). | all | [
"BG-5",
"BT-40"
] | https://matheel.app/en/zatca-errors/br-09 | https://matheel.app/akhta/br-09 |
BR-13 | warning | EN 16931 (CEN) rules | [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). | not(exists(cbc:TaxExclusiveAmount)) | The invoice total without VAT (BT-109) must be present | يجب ذكر إجمالي الفاتورة دون ضريبة القيمة المضافة (BT-109) | Checks that cac:LegalMonetaryTotal contains a cbc:TaxExclusiveAmount element. | Add the total without VAT inside cac:LegalMonetaryTotal, e.g. `<cbc:TaxExclusiveAmount currencyID="SAR">100.00</cbc:TaxExclusiveAmount>`. | تتحقق القاعدة من أن العنصر cac:LegalMonetaryTotal يحتوي على العنصر cbc:TaxExclusiveAmount. | أضف الإجمالي دون الضريبة داخل cac:LegalMonetaryTotal، مثل `<cbc:TaxExclusiveAmount currencyID="SAR">100.00</cbc:TaxExclusiveAmount>`. | all | [
"BT-109"
] | https://matheel.app/en/zatca-errors/br-13 | https://matheel.app/akhta/br-13 |
BR-14 | error | EN 16931 (CEN) rules | [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). | not(exists(cbc:TaxInclusiveAmount)) | The invoice total with VAT (BT-112) must be present | يجب ذكر إجمالي الفاتورة شاملًا ضريبة القيمة المضافة (BT-112) | Checks that cac:LegalMonetaryTotal contains a cbc:TaxInclusiveAmount element. | Add the total with VAT inside cac:LegalMonetaryTotal, e.g. `<cbc:TaxInclusiveAmount currencyID="SAR">115.00</cbc:TaxInclusiveAmount>`. | تتحقق القاعدة من أن العنصر cac:LegalMonetaryTotal يحتوي على العنصر cbc:TaxInclusiveAmount. | أضف الإجمالي شاملًا الضريبة داخل cac:LegalMonetaryTotal، مثل `<cbc:TaxInclusiveAmount currencyID="SAR">115.00</cbc:TaxInclusiveAmount>`. | all | [
"BT-112"
] | https://matheel.app/en/zatca-errors/br-14 | https://matheel.app/akhta/br-14 |
BR-15 | error | EN 16931 (CEN) rules | [BR-15]-An Invoice shall have the Amount due for payment (BT-115). | not(exists(cbc:PayableAmount)) | The amount due for payment (BT-115) must be present | يجب ذكر المبلغ المستحق الدفع (BT-115) | Checks that cac:LegalMonetaryTotal contains a cbc:PayableAmount element. | Add the amount due inside cac:LegalMonetaryTotal, e.g. `<cbc:PayableAmount currencyID="SAR">115.00</cbc:PayableAmount>`. | تتحقق القاعدة من أن العنصر cac:LegalMonetaryTotal يحتوي على العنصر cbc:PayableAmount. | أضف المبلغ المستحق داخل cac:LegalMonetaryTotal، مثل `<cbc:PayableAmount currencyID="SAR">115.00</cbc:PayableAmount>`. | all | [
"BT-115"
] | https://matheel.app/en/zatca-errors/br-15 | https://matheel.app/akhta/br-15 |
BR-16 | error | EN 16931 (CEN) rules | [BR-16]-An Invoice shall have at least one Invoice line (BG-25) | not(exists(cac:InvoiceLine) or exists(cac:CreditNoteLine)) | Every invoice needs at least one invoice line (BG-25) | يجب أن تحتوي كل فاتورة على بند واحد على الأقل (BG-25) | Checks that the document root contains at least one cac:InvoiceLine (or cac:CreditNoteLine in a cn:CreditNote document). | Add at least one cac:InvoiceLine under the root element, with its line ID, quantity, net amount, item and price. | تتحقق القاعدة من أن العنصر الجذر يحتوي على عنصر cac:InvoiceLine واحد على الأقل (أو cac:CreditNoteLine في مستند من نوع cn:CreditNote). | أضف عنصر cac:InvoiceLine واحدًا على الأقل تحت العنصر الجذر، يتضمن معرّف البند والكمية وصافي المبلغ والصنف والسعر. | all | [
"BG-25"
] | https://matheel.app/en/zatca-errors/br-16 | https://matheel.app/akhta/br-16 |
BR-21 | warning | EN 16931 (CEN) rules | [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). | not((cbc:ID) != '') | Each invoice line needs a line identifier (BT-126) | يجب أن يحمل كل بند في الفاتورة معرّفًا (BT-126) | Checks that every cac:InvoiceLine (or cac:CreditNoteLine) has a non-empty cbc:ID. | Give each line a non-empty identifier as its first child, e.g. `<cbc:ID>1</cbc:ID>`. | تتحقق القاعدة من أن كل عنصر cac:InvoiceLine (أو cac:CreditNoteLine) يحتوي على cbc:ID غير فارغ. | أعطِ كل بند معرّفًا غير فارغ، مثل `<cbc:ID>1</cbc:ID>`. | all | [
"BG-25",
"BT-126"
] | https://matheel.app/en/zatca-errors/br-21 | https://matheel.app/akhta/br-21 |
BR-22 | error | EN 16931 (CEN) rules | [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). | (not(exists(cbc:InvoicedQuantity)) or cbc:InvoicedQuantity/text() = '0') | Each invoice line needs an invoiced quantity (BT-129) | يجب أن يحمل كل بند في الفاتورة الكمية المفوترة (BT-129) | Checks each cac:InvoiceLine / cac:CreditNoteLine for cbc:InvoicedQuantity. The check the validator actually executes is stricter than the displayed test: it fails when cbc:InvoicedQuantity is missing or its text is exactly '0', and it does not accept cbc:CreditedQuantity as a substitute (the displayed test accepts eith... | Add `<cbc:InvoicedQuantity>1.00</cbc:InvoicedQuantity>` to every line, and do not write the quantity as the bare value 0. | تتحقق القاعدة من وجود cbc:InvoicedQuantity في كل عنصر cac:InvoiceLine أو cac:CreditNoteLine. الفحص الذي ينفّذه المدقق فعليًا أشد من الاختبار المعروض: يفشل عند غياب cbc:InvoicedQuantity أو إذا كانت قيمته النصية '0' تمامًا، ولا يقبل cbc:CreditedQuantity بديلًا (بينما يقبل الاختبار المعروض أيًّا منهما). | أضف `<cbc:InvoicedQuantity>1.00</cbc:InvoicedQuantity>` إلى كل بند، ولا تكتب الكمية بالقيمة 0 المجردة. | all | [
"BG-25",
"BT-129"
] | https://matheel.app/en/zatca-errors/br-22 | https://matheel.app/akhta/br-22 |
BR-24 | error | EN 16931 (CEN) rules | [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). | not(exists(cbc:LineExtensionAmount)) | Each invoice line needs a line net amount (BT-131) | يجب أن يحمل كل بند صافي مبلغ البند (BT-131) | Checks that every cac:InvoiceLine (or cac:CreditNoteLine) contains a cbc:LineExtensionAmount element. | Add the line net amount to every line, e.g. `<cbc:LineExtensionAmount currencyID="SAR">100.00</cbc:LineExtensionAmount>`. | تتحقق القاعدة من أن كل عنصر cac:InvoiceLine (أو cac:CreditNoteLine) يحتوي على العنصر cbc:LineExtensionAmount. | أضف صافي مبلغ البند إلى كل بند، مثل `<cbc:LineExtensionAmount currencyID="SAR">100.00</cbc:LineExtensionAmount>`. | all | [
"BG-25",
"BT-131"
] | https://matheel.app/en/zatca-errors/br-24 | https://matheel.app/akhta/br-24 |
BR-25 | warning | EN 16931 (CEN) rules | [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). | not((cac:Item/cbc:Name) != '') | Each invoice line needs an item name (BT-153) | يجب أن يحمل كل بند اسم الصنف (BT-153) | Checks that every cac:InvoiceLine (or cac:CreditNoteLine) has cac:Item/cbc:Name with a non-empty value. | Inside each line's cac:Item add a non-empty name, e.g. `<cac:Item><cbc:Name>Item name</cbc:Name></cac:Item>`. | تتحقق القاعدة من أن كل عنصر cac:InvoiceLine (أو cac:CreditNoteLine) يحتوي على cac:Item/cbc:Name بقيمة غير فارغة. | داخل العنصر cac:Item في كل بند أضف اسمًا غير فارغ، مثل `<cac:Item><cbc:Name>Item name</cbc:Name></cac:Item>`. | all | [
"BG-25",
"BT-153"
] | https://matheel.app/en/zatca-errors/br-25 | https://matheel.app/akhta/br-25 |
BR-26 | error | EN 16931 (CEN) rules | [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). | not(exists(cac:Price/cbc:PriceAmount)) | Each invoice line needs an item net price (BT-146) | يجب أن يحمل كل بند صافي سعر الصنف (BT-146) | Checks that every cac:InvoiceLine (or cac:CreditNoteLine) contains cac:Price/cbc:PriceAmount. | Add the net price to every line, e.g. `<cac:Price><cbc:PriceAmount currencyID="SAR">100.00</cbc:PriceAmount></cac:Price>`. | تتحقق القاعدة من أن كل عنصر cac:InvoiceLine (أو cac:CreditNoteLine) يحتوي على cac:Price/cbc:PriceAmount. | أضف صافي السعر إلى كل بند، مثل `<cac:Price><cbc:PriceAmount currencyID="SAR">100.00</cbc:PriceAmount></cac:Price>`. | all | [
"BG-25",
"BT-146"
] | https://matheel.app/en/zatca-errors/br-26 | https://matheel.app/akhta/br-26 |
BR-31 | error | EN 16931 (CEN) rules | [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). | not(exists(cbc:Amount)) | Each document-level allowance needs an amount (BT-92) | يجب أن يحمل كل خصم على مستوى المستند مبلغًا (BT-92) | Applies only when the document has a document-level cac:AllowanceCharge with cbc:ChargeIndicator = false (an allowance); each such element must contain cbc:Amount. | Add the allowance amount inside each document-level allowance, e.g. `<cbc:Amount currencyID="SAR">10.00</cbc:Amount>`. | تنطبق القاعدة فقط عند وجود عنصر cac:AllowanceCharge على مستوى المستند وقيمة cbc:ChargeIndicator فيه false (أي خصم)؛ ويجب أن يحتوي كل عنصر منها على cbc:Amount. | أضف مبلغ الخصم داخل كل خصم على مستوى المستند، مثل `<cbc:Amount currencyID="SAR">10.00</cbc:Amount>`. | conditional | [
"BG-20",
"BT-92"
] | https://matheel.app/en/zatca-errors/br-31 | https://matheel.app/akhta/br-31 |
BR-32 | error | EN 16931 (CEN) rules | [BR-32]-Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95). | not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) and (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID) !='') | Each document-level allowance needs a VAT category code (BT-95) | يجب أن يحمل كل خصم على مستوى المستند رمز فئة الضريبة (BT-95) | Applies only to document-level cac:AllowanceCharge elements with cbc:ChargeIndicator = false; each must contain a cac:TaxCategory whose cac:TaxScheme/cbc:ID is 'VAT' and whose own cbc:ID is not empty. | Inside each document-level allowance add a VAT category, e.g. `<cac:TaxCategory><cbc:ID>S</cbc:ID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory>`. | تنطبق القاعدة فقط على عناصر cac:AllowanceCharge على مستوى المستند التي تكون فيها cbc:ChargeIndicator بقيمة false؛ ويجب أن يحتوي كل منها على cac:TaxCategory تكون فيه قيمة cac:TaxScheme/cbc:ID هي 'VAT' وقيمة cbc:ID الخاص به غير فارغة. | داخل كل خصم على مستوى المستند أضف فئة الضريبة، مثل `<cac:TaxCategory><cbc:ID>S</cbc:ID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory>`. | conditional | [
"BG-20",
"BT-95"
] | https://matheel.app/en/zatca-errors/br-32 | https://matheel.app/akhta/br-32 |
BR-36 | warning | EN 16931 (CEN) rules | [BR-36]-Each Document level charge (BG-21) shall have a Document level charge amount (BT-99). | (not (exists(./cbc:Amount))) | Each document-level charge needs an amount (BT-99) | يجب أن تحمل كل رسوم إضافية على مستوى المستند مبلغًا (BT-99) | Applies only to document-level cac:AllowanceCharge elements with cbc:ChargeIndicator = true (a charge); the validator checks that each contains cbc:Amount. The test text published with the rule is malformed (it looks for lower-case cbc:amount via an absolute path), but the condition actually executed is the presence of... | Add the charge amount inside each document-level charge, e.g. `<cbc:Amount currencyID="SAR">10.00</cbc:Amount>`. | تنطبق القاعدة فقط على عناصر cac:AllowanceCharge على مستوى المستند التي تكون فيها cbc:ChargeIndicator بقيمة true (أي رسوم إضافية)؛ ويتحقق المدقق من أن كلًّا منها يحتوي على cbc:Amount. نص الاختبار المنشور مع القاعدة معيب (يبحث عن cbc:amount بحرف صغير عبر مسار مطلق)، لكن الشرط المنفَّذ فعليًا هو وجود cbc:Amount، بما يطابق... | أضف مبلغ الرسوم داخل كل رسوم إضافية على مستوى المستند، مثل `<cbc:Amount currencyID="SAR">10.00</cbc:Amount>`. | conditional | [
"BG-21",
"BT-99"
] | https://matheel.app/en/zatca-errors/br-36 | https://matheel.app/akhta/br-36 |
BR-37 | warning | EN 16931 (CEN) rules | [BR-37]-Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102). | not(exists(cac:TaxCategory/cbc:ID)) | Each document-level charge needs a VAT category code (BT-102) | رمز فئة الضريبة (BT-102) إلزامي لكل رسوم على مستوى المستند | Applies only to document-level cac:AllowanceCharge elements with cbc:ChargeIndicator = true; the validator checks that each contains cac:TaxCategory/cbc:ID. The published test text is malformed (it uses an undeclared cvc: prefix and an absolute path); the executed check is the presence of cac:TaxCategory/cbc:ID, matchi... | Inside each document-level charge add a tax category with an ID, e.g. `<cac:TaxCategory><cbc:ID>S</cbc:ID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory>`. | تنطبق القاعدة فقط على عناصر cac:AllowanceCharge على مستوى المستند التي تكون فيها cbc:ChargeIndicator بقيمة true؛ ويتحقق المدقق من أن كلًّا منها يحتوي على cac:TaxCategory/cbc:ID. نص الاختبار المنشور معيب (يستخدم البادئة cvc: غير المعرّفة ومسارًا مطلقًا)، والفحص المنفَّذ فعليًا هو وجود cac:TaxCategory/cbc:ID، بما يطابق ا... | داخل كل رسوم إضافية على مستوى المستند أضف فئة ضريبة تحمل معرّفًا، مثل `<cac:TaxCategory><cbc:ID>S</cbc:ID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory>`. | conditional | [
"BG-21",
"BT-102"
] | https://matheel.app/en/zatca-errors/br-37 | https://matheel.app/akhta/br-37 |
BR-41 | error | EN 16931 (CEN) rules | [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). | not(exists(cbc:Amount)) | Each line-level allowance needs an amount (BT-136) | يجب أن يحمل كل خصم على مستوى البند مبلغًا (BT-136) | Applies only when an invoice line has a cac:AllowanceCharge with cbc:ChargeIndicator = false (a line allowance); each such element must contain cbc:Amount. | Add the amount inside each line-level allowance, e.g. `<cbc:Amount currencyID="SAR">5.00</cbc:Amount>`. | تنطبق القاعدة فقط عند وجود عنصر cac:AllowanceCharge داخل بند الفاتورة وقيمة cbc:ChargeIndicator فيه false (أي خصم على البند)؛ ويجب أن يحتوي كل عنصر منها على cbc:Amount. | أضف المبلغ داخل كل خصم على مستوى البند، مثل `<cbc:Amount currencyID="SAR">5.00</cbc:Amount>`. | conditional | [
"BG-27",
"BT-136"
] | https://matheel.app/en/zatca-errors/br-41 | https://matheel.app/akhta/br-41 |
BR-43 | warning | EN 16931 (CEN) rules | [BR-43]-Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141). | (not (exists(./cbc:Amount))) | Each line-level charge needs an amount (BT-141) | يجب أن تحمل كل رسوم إضافية على مستوى البند مبلغًا (BT-141) | Applies only to cac:InvoiceLine/cac:AllowanceCharge elements with cbc:ChargeIndicator = true (a line charge); the validator checks that each contains cbc:Amount. The published test text is malformed (lower-case cbc:amount via an absolute path), but the executed condition is the presence of cbc:Amount, matching the offi... | Add the amount inside each line-level charge, e.g. `<cbc:Amount currencyID="SAR">5.00</cbc:Amount>`. | تنطبق القاعدة فقط على عناصر cac:InvoiceLine/cac:AllowanceCharge التي تكون فيها cbc:ChargeIndicator بقيمة true (أي رسوم على البند)؛ ويتحقق المدقق من أن كلًّا منها يحتوي على cbc:Amount. نص الاختبار المنشور معيب (يبحث عن cbc:amount بحرف صغير عبر مسار مطلق)، لكن الشرط المنفَّذ فعليًا هو وجود cbc:Amount، بما يطابق الرسالة ا... | أضف المبلغ داخل كل رسوم إضافية على مستوى البند، مثل `<cbc:Amount currencyID="SAR">5.00</cbc:Amount>`. | conditional | [
"BG-28",
"BT-141"
] | https://matheel.app/en/zatca-errors/br-43 | https://matheel.app/akhta/br-43 |
BR-45 | error | EN 16931 (CEN) rules | [BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116). | not(exists(cbc:TaxableAmount)) | Each VAT breakdown needs a taxable amount (BT-116) | يجب أن يحمل كل تفصيل ضريبي المبلغ الخاضع للضريبة (BT-116) | Checks that every cac:TaxTotal/cac:TaxSubtotal under ubl:Invoice contains cbc:TaxableAmount. | Add the taxable amount inside each cac:TaxSubtotal, e.g. `<cbc:TaxableAmount currencyID="SAR">100.00</cbc:TaxableAmount>`. | تتحقق القاعدة من أن كل عنصر cac:TaxTotal/cac:TaxSubtotal تحت ubl:Invoice يحتوي على cbc:TaxableAmount. | أضف المبلغ الخاضع للضريبة داخل كل cac:TaxSubtotal، مثل `<cbc:TaxableAmount currencyID="SAR">100.00</cbc:TaxableAmount>`. | all | [
"BG-23",
"BT-116"
] | https://matheel.app/en/zatca-errors/br-45 | https://matheel.app/akhta/br-45 |
BR-46 | error | EN 16931 (CEN) rules | [BR-46]-Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117). | not(exists(cbc:TaxAmount)) | Each VAT breakdown needs a VAT amount (BT-117) | يجب أن يحمل كل تفصيل ضريبي مبلغ الضريبة (BT-117) | Checks that every cac:TaxTotal/cac:TaxSubtotal under ubl:Invoice contains cbc:TaxAmount. | Add the VAT amount inside each cac:TaxSubtotal, e.g. `<cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount>`. | تتحقق القاعدة من أن كل عنصر cac:TaxTotal/cac:TaxSubtotal تحت ubl:Invoice يحتوي على cbc:TaxAmount. | أضف مبلغ الضريبة داخل كل cac:TaxSubtotal، مثل `<cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount>`. | all | [
"BG-23",
"BT-117"
] | https://matheel.app/en/zatca-errors/br-46 | https://matheel.app/akhta/br-46 |
BR-47 | error | EN 16931 (CEN) rules | [BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118). | not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID)) | Each VAT breakdown needs a VAT category code (BT-118) | يجب أن يحمل كل تفصيل ضريبي رمز فئة الضريبة (BT-118) | Checks that every cac:TaxTotal/cac:TaxSubtotal under ubl:Invoice contains a cac:TaxCategory whose cac:TaxScheme/cbc:ID is 'VAT' and which has a cbc:ID. | Inside each cac:TaxSubtotal add `<cac:TaxCategory><cbc:ID>S</cbc:ID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory>` with the category code that applies. | تتحقق القاعدة من أن كل عنصر cac:TaxTotal/cac:TaxSubtotal تحت ubl:Invoice يحتوي على cac:TaxCategory تكون فيه قيمة cac:TaxScheme/cbc:ID هي 'VAT' ويحمل العنصر cbc:ID. | داخل كل cac:TaxSubtotal أضف `<cac:TaxCategory><cbc:ID>S</cbc:ID><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:TaxCategory>` مع رمز الفئة المنطبق. | all | [
"BG-23",
"BT-118"
] | https://matheel.app/en/zatca-errors/br-47 | https://matheel.app/akhta/br-47 |
BR-48 | error | EN 16931 (CEN) rules | [BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT. | not(exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:Percent) or (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/normalize-space(cbc:ID)='O')) | Each VAT breakdown needs a VAT rate (BT-119) unless category is O | نسبة الضريبة (BT-119) إلزامية في كل تفصيل ضريبي إلا للفئة O | Checks that the VAT cac:TaxCategory in every cac:TaxTotal/cac:TaxSubtotal under ubl:Invoice contains cbc:Percent; the only exception is when that category's cbc:ID is 'O' (not subject to VAT). | Add the rate inside the subtotal's cac:TaxCategory, e.g. `<cbc:Percent>15.00</cbc:Percent>`; it may be omitted only when the category cbc:ID is O. | تتحقق القاعدة من أن فئة الضريبة cac:TaxCategory في كل عنصر cac:TaxTotal/cac:TaxSubtotal تحت ubl:Invoice تحتوي على cbc:Percent؛ والاستثناء الوحيد عندما تكون قيمة cbc:ID للفئة 'O' (غير خاضع للضريبة). | أضف النسبة داخل cac:TaxCategory في التفصيل الضريبي، مثل `<cbc:Percent>15.00</cbc:Percent>`؛ ويجوز حذفها فقط عندما تكون قيمة cbc:ID للفئة O. | all | [
"BG-23",
"BT-119"
] | https://matheel.app/en/zatca-errors/br-48 | https://matheel.app/akhta/br-48 |
BR-49 | warning | EN 16931 (CEN) rules | [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). | boolean(//*[matches(@name, '01\d{5}')]) and not(exists(cbc:PaymentMeansCode)) | Payment means must state a payment means code (BT-81) | يجب أن تتضمن وسيلة الدفع رمز وسيلة الدفع (BT-81) | Checks that each cac:PaymentMeans contains cbc:PaymentMeansCode. As executed, the check only runs when the document contains a @name attribute matching '01' followed by five digits, i.e. a standard tax invoice subtype on cbc:InvoiceTypeCode (e.g. name="0100000"); the official text and displayed test do not mention this... | Add a UNCL4461 code (see BR-CL-16) inside each cac:PaymentMeans, e.g. `<cac:PaymentMeans><cbc:PaymentMeansCode>10</cbc:PaymentMeansCode></cac:PaymentMeans>`. | تتحقق القاعدة من أن كل عنصر cac:PaymentMeans يحتوي على cbc:PaymentMeansCode. وفق التنفيذ الفعلي، لا يجري الفحص إلا إذا احتوى المستند على سمة @name تطابق '01' متبوعة بخمسة أرقام، أي نوع فرعي لفاتورة ضريبية قياسية في cbc:InvoiceTypeCode (مثل name="0100000")؛ ولا يذكر النص الرسمي ولا الاختبار المعروض هذا الشرط. | أضف رمزًا من قائمة UNCL4461 (انظر BR-CL-16) داخل كل cac:PaymentMeans، مثل `<cac:PaymentMeans><cbc:PaymentMeansCode>10</cbc:PaymentMeansCode></cac:PaymentMeans>`. | standard | [
"BG-16",
"BT-81"
] | https://matheel.app/en/zatca-errors/br-49 | https://matheel.app/akhta/br-49 |
BR-52 | warning | EN 16931 (CEN) rules | [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). | not((cbc:ID) != '') | Each additional document reference needs an ID (BT-122) | يجب أن يحمل كل مرجع لمستند إضافي معرّفًا (BT-122) | Checks that every cac:AdditionalDocumentReference has a non-empty cbc:ID. | Give each cac:AdditionalDocumentReference a non-empty cbc:ID; in the official samples these are values such as `<cbc:ID>ICV</cbc:ID>`, `<cbc:ID>PIH</cbc:ID>` and `<cbc:ID>QR</cbc:ID>`. | تتحقق القاعدة من أن كل عنصر cac:AdditionalDocumentReference يحتوي على cbc:ID غير فارغ. | أعطِ كل عنصر cac:AdditionalDocumentReference قيمة cbc:ID غير فارغة؛ وفي النماذج الرسمية تكون قيمًا مثل `<cbc:ID>ICV</cbc:ID>` و`<cbc:ID>PIH</cbc:ID>` و`<cbc:ID>QR</cbc:ID>`. | all | [
"BG-24",
"BT-122"
] | https://matheel.app/en/zatca-errors/br-52 | https://matheel.app/akhta/br-52 |
BR-53 | warning | EN 16931 (CEN) rules | [BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided. | (exists(cbc:TaxCurrencyCode) and not(every $taxcurrency in ./cac:TaxTotal[not(cac:TaxSubtotal)]/cbc:TaxAmount/@currencyID satisfies $taxcurrency = cbc:TaxCurrencyCode)) or (exists(cbc:TaxCurrencyCode) and not(every $taxamount in ./cac:TaxTotal[not(cac:TaxSubtotal)] satisfies exists($taxamount/cbc:TaxAmount))) | With a tax currency (BT-6), give the VAT total in it (BT-111) | مع عملة الضريبة (BT-6) يُذكر إجمالي الضريبة بها (BT-111) | Applies only when cbc:TaxCurrencyCode is present. As executed, it fails if any cac:TaxTotal that has no cac:TaxSubtotal lacks cbc:TaxAmount, or has a cbc:TaxAmount whose @currencyID differs from cbc:TaxCurrencyCode. The displayed test is the failure condition (not a pass condition) and considers every cac:TaxTotal; the... | When you set cbc:TaxCurrencyCode, add a cac:TaxTotal without subtotals whose amount uses that currency, e.g. with SAR: `<cac:TaxTotal><cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount></cac:TaxTotal>`. | تنطبق القاعدة فقط عند وجود cbc:TaxCurrencyCode. وفق التنفيذ الفعلي، تفشل إذا وُجد عنصر cac:TaxTotal لا يحتوي على cac:TaxSubtotal وكان خاليًا من cbc:TaxAmount، أو كانت قيمة @currencyID في cbc:TaxAmount مختلفة عن cbc:TaxCurrencyCode. الاختبار المعروض هو شرط الفشل (لا شرط النجاح) ويشمل كل عناصر cac:TaxTotal، بينما يقتصر ا... | عند تحديد cbc:TaxCurrencyCode أضف عنصر cac:TaxTotal دون تفاصيل ضريبية يكون مبلغه بتلك العملة، مثلًا مع SAR: `<cac:TaxTotal><cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount></cac:TaxTotal>`. | conditional | [
"BT-6",
"BT-111"
] | https://matheel.app/en/zatca-errors/br-53 | https://matheel.app/akhta/br-53 |
BR-54 | error | EN 16931 (CEN) rules | [BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161). | not(exists(cbc:Name) and exists(cbc:Value)) | Each item attribute needs a name (BT-160) and a value (BT-161) | يجب أن تحمل كل خاصية صنف اسمًا (BT-160) وقيمة (BT-161) | Applies only when cac:AdditionalItemProperty is used; every such element must contain both cbc:Name and cbc:Value. | Give each item property both children, e.g. `<cac:AdditionalItemProperty><cbc:Name>Colour</cbc:Name><cbc:Value>Black</cbc:Value></cac:AdditionalItemProperty>`. | تنطبق القاعدة فقط عند استخدام cac:AdditionalItemProperty؛ ويجب أن يحتوي كل عنصر منها على cbc:Name وcbc:Value معًا. | أعطِ كل خاصية صنف العنصرين معًا، مثل `<cac:AdditionalItemProperty><cbc:Name>Colour</cbc:Name><cbc:Value>Black</cbc:Value></cac:AdditionalItemProperty>`. | conditional | [
"BG-32",
"BT-160",
"BT-161"
] | https://matheel.app/en/zatca-errors/br-54 | https://matheel.app/akhta/br-54 |
BR-55 | error | EN 16931 (CEN) rules | [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). | not(exists(cac:InvoiceDocumentReference/cbc:ID) and (cac:InvoiceDocumentReference/cbc:ID) !='') | A billing reference must give the preceding invoice number (BT-25) | يجب أن يتضمن مرجع الفوترة رقم الفاتورة السابقة (BT-25) | Applies only when cac:BillingReference is present; each must contain cac:InvoiceDocumentReference/cbc:ID with a non-empty value. | Inside each billing reference put the referenced invoice number: `<cac:BillingReference><cac:InvoiceDocumentReference><cbc:ID>INV-0001</cbc:ID></cac:InvoiceDocumentReference></cac:BillingReference>`. | تنطبق القاعدة فقط عند وجود cac:BillingReference؛ ويجب أن يحتوي كل منها على cac:InvoiceDocumentReference/cbc:ID بقيمة غير فارغة. | داخل كل مرجع فوترة ضع رقم الفاتورة المشار إليها: `<cac:BillingReference><cac:InvoiceDocumentReference><cbc:ID>INV-0001</cbc:ID></cac:InvoiceDocumentReference></cac:BillingReference>`. | conditional | [
"BG-3",
"BT-25"
] | https://matheel.app/en/zatca-errors/br-55 | https://matheel.app/akhta/br-55 |
BR-CL-01 | error | EN 16931 (CEN) rules | [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. | not((self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 80 82 84 130 202 203 204 211 295 325 326 380 381 383 384 385 386 387 388 389 390 393 394 395 456 457 527 575 623 633 751 780 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(norm... | Invoice type code must be a valid UNTDID 1001 code | يجب أن يكون رمز نوع الفاتورة من قائمة UNTDID 1001 | Checks that the value of cbc:InvoiceTypeCode (or cbc:CreditNoteTypeCode) is a single code, without spaces, from the UNTDID 1001 subset listed in the rule; for cbc:InvoiceTypeCode the list includes 388, 381 and 383, which the official samples use for invoices, credit notes and debit notes. | Use one of the listed codes as the element value, e.g. `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>`, with no extra spaces or text. | تتحقق القاعدة من أن قيمة cbc:InvoiceTypeCode (أو cbc:CreditNoteTypeCode) رمز واحد دون مسافات من مجموعة رموز UNTDID 1001 المذكورة في القاعدة؛ وتشمل القائمة الخاصة بـ cbc:InvoiceTypeCode الرموز 388 و381 و383 التي تستخدمها النماذج الرسمية للفاتورة والإشعار الدائن والإشعار المدين. | استخدم أحد الرموز المذكورة قيمةً للعنصر، مثل `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>`، دون مسافات أو نص إضافي. | all | [] | https://matheel.app/en/zatca-errors/br-cl-01 | https://matheel.app/akhta/br-cl-01 |
BR-CL-03 | error | EN 16931 (CEN) rules | [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 | string-length(@currencyID) > 0 and not(((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS... | Amount currencyID must be an ISO 4217 alpha-3 code | يجب أن تكون سمة currencyID للمبالغ رمزًا من ISO 4217 | Checks the @currencyID attribute on amount elements (cbc:Amount, cbc:BaseAmount, cbc:PriceAmount, cbc:TaxAmount, cbc:TaxableAmount, cbc:LineExtensionAmount, cbc:TaxExclusiveAmount, cbc:TaxInclusiveAmount, cbc:AllowanceTotalAmount, cbc:ChargeTotalAmount, cbc:PrepaidAmount, cbc:PayableRoundingAmount, cbc:PayableAmount) a... | Set a valid three-letter ISO 4217 code on every amount, e.g. `<cbc:PayableAmount currencyID="SAR">115.00</cbc:PayableAmount>`. | تتحقق القاعدة من السمة @currencyID على عناصر المبالغ (cbc:Amount وcbc:BaseAmount وcbc:PriceAmount وcbc:TaxAmount وcbc:TaxableAmount وcbc:LineExtensionAmount وcbc:TaxExclusiveAmount وcbc:TaxInclusiveAmount وcbc:AllowanceTotalAmount وcbc:ChargeTotalAmount وcbc:PrepaidAmount وcbc:PayableRoundingAmount وcbc:PayableAmount) ... | ضع رمزًا ثلاثيًا صحيحًا من ISO 4217 على كل مبلغ، مثل `<cbc:PayableAmount currencyID="SAR">115.00</cbc:PayableAmount>`. | all | [] | https://matheel.app/en/zatca-errors/br-cl-03 | https://matheel.app/akhta/br-cl-03 |
BR-CL-04 | error | EN 16931 (CEN) rules | [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 | not(((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ... | Invoice currency code must be an ISO 4217 alpha-3 code | يجب أن يكون رمز عملة الفاتورة من ISO 4217 | Checks that cbc:DocumentCurrencyCode is a single ISO 4217 alpha-3 code, without spaces, from the list in the rule (which includes SAR). | Use a valid three-letter code, e.g. `<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>`. | تتحقق القاعدة من أن cbc:DocumentCurrencyCode رمز واحد دون مسافات من قائمة ISO 4217 الثلاثية الواردة في القاعدة (وتشمل SAR). | استخدم رمزًا ثلاثيًا صحيحًا، مثل `<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>`. | all | [] | https://matheel.app/en/zatca-errors/br-cl-04 | https://matheel.app/akhta/br-cl-04 |
BR-CL-05 | error | EN 16931 (CEN) rules | [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 | not(((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ... | Tax currency code must be an ISO 4217 alpha-3 code | يجب أن يكون رمز عملة الضريبة من ISO 4217 | Applies when cbc:TaxCurrencyCode is present; its value must be a single ISO 4217 alpha-3 code, without spaces, from the list in the rule (which includes SAR). | Use a valid three-letter code, e.g. `<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>`. | تنطبق القاعدة عند وجود cbc:TaxCurrencyCode؛ ويجب أن تكون قيمته رمزًا واحدًا دون مسافات من قائمة ISO 4217 الثلاثية الواردة في القاعدة (وتشمل SAR). | استخدم رمزًا ثلاثيًا صحيحًا، مثل `<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>`. | conditional | [] | https://matheel.app/en/zatca-errors/br-cl-05 | https://matheel.app/akhta/br-cl-05 |
BR-CL-14 | warning | EN 16931 (CEN) rules | [BR-CL-14]-Country codes in an invoice MUST be coded using ISO code list 3166-1 | not(((not(contains(normalize-space(.), ' ')) and contains(' 1A AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN... | Country codes must be ISO 3166-1 alpha-2 codes | يجب أن تكون رموز الدول من ISO 3166-1 | Checks every cac:Country/cbc:IdentificationCode in the document (seller, buyer or any other address) against the two-character country list in the rule, which is ISO 3166-1 alpha-2 plus 1A and XI and includes SA. | Use a two-letter code from the list, without spaces, e.g. `<cac:Country><cbc:IdentificationCode>SA</cbc:IdentificationCode></cac:Country>`. | تتحقق القاعدة من كل عنصر cac:Country/cbc:IdentificationCode في المستند (للبائع أو المشتري أو أي عنوان آخر) مقابل قائمة رموز الدول الثنائية الواردة في القاعدة، وهي ISO 3166-1 alpha-2 مضافًا إليها 1A وXI، وتشمل SA. | استخدم رمزًا ثنائيًا من القائمة دون مسافات، مثل `<cac:Country><cbc:IdentificationCode>SA</cbc:IdentificationCode></cac:Country>`. | all | [] | https://matheel.app/en/zatca-errors/br-cl-14 | https://matheel.app/akhta/br-cl-14 |
BR-CL-16 | warning | EN 16931 (CEN) rules | [BR-CL-16]-Payment means in an invoice MUST be coded using UNCL4461 code list | not(( ( not(contains(normalize-space(.),' ')) and contains( ' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 74 75 76 77 78 91 92 93 94 95 96 97 ZZZ ',concat(' ',norm... | Payment means code must be from the UNCL4461 list | يجب أن يكون رمز وسيلة الدفع من قائمة UNCL4461 | Applies when cac:PaymentMeans/cbc:PaymentMeansCode is present; its value must be one code from the list in the rule: 1 to 70, 74 to 78, 91 to 97, or ZZZ. | Use one of the allowed codes with no spaces, e.g. `<cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>`. | تنطبق القاعدة عند وجود cac:PaymentMeans/cbc:PaymentMeansCode؛ ويجب أن تكون قيمته رمزًا واحدًا من القائمة الواردة في القاعدة: من 1 إلى 70، ومن 74 إلى 78، ومن 91 إلى 97، أو ZZZ. | استخدم أحد الرموز المسموح بها دون مسافات، مثل `<cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>`. | conditional | [] | https://matheel.app/en/zatca-errors/br-cl-16 | https://matheel.app/akhta/br-cl-16 |
BR-CL-18 | error | EN 16931 (CEN) rules | [BR-CL-18]-Invoice tax categories MUST be coded using UNCL5305 code list. | not(( ( not(contains(normalize-space(.),' ')) and contains( ' AE L M E S Z G O K B ',concat(' ',normalize-space(.),' ') ) ) )) | Tax category codes must come from the UNCL5305 code list | رموز فئات الضريبة يجب أن تكون من قائمة UNCL5305 | Every tax category code (cbc:ID under cac:TaxCategory in cac:TaxSubtotal and cac:AllowanceCharge, and under cac:Item/cac:ClassifiedTaxCategory on lines) must be a single code from AE, L, M, E, S, Z, G, O, K, B. | Use one of AE, L, M, E, S, Z, G, O, K, B with no spaces, e.g. `<cbc:ID>S</cbc:ID>`. Note that BR-KSA-18 narrows this further to S, Z, E or O. | يتحقق من أن كل رمز فئة ضريبة (cbc:ID داخل cac:TaxCategory في cac:TaxSubtotal و cac:AllowanceCharge، وداخل cac:Item/cac:ClassifiedTaxCategory في البنود) رمز واحد من: AE, L, M, E, S, Z, G, O, K, B. | استخدم أحد الرموز AE, L, M, E, S, Z, G, O, K, B دون مسافات، مثل `<cbc:ID>S</cbc:ID>`. لاحظ أن القاعدة BR-KSA-18 تحصر القيم المقبولة في S أو Z أو E أو O. | all | [] | https://matheel.app/en/zatca-errors/br-cl-18 | https://matheel.app/akhta/br-cl-18 |
BR-CL-KSA-14 | error | ZATCA KSA rules | [KSA-14]Field character limit for QR Code field has been exceeded. The maximum character limit for this field is 1000 characters. | exists(cac:AdditionalDocumentReference[normalize-space(cbc:ID) = 'QR']/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) and (string-length(cac:AdditionalDocumentReference[normalize-space(cbc:ID) = 'QR']/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) > 1000 or string-length(cac:AdditionalDocumentReference[normalize-sp... | The QR code value must be 1 to 1000 characters long | قيمة رمز QR يجب أن تكون بين 1 و1000 حرف | Applies only when the QR element exists: the content of cac:AdditionalDocumentReference with cbc:ID = 'QR' / cac:Attachment / cbc:EmbeddedDocumentBinaryObject must be at least 1 and at most 1000 characters. (The rule's test text is written as the failure condition: it fires when the length is over 1000 or under 1.) | Keep the Base64 QR value in cbc:EmbeddedDocumentBinaryObject non-empty and no longer than 1000 characters. | تنطبق فقط عند وجود عنصر QR: يجب أن يكون محتوى cbc:EmbeddedDocumentBinaryObject داخل cac:AdditionalDocumentReference ذي cbc:ID = 'QR' / cac:Attachment بين 1 و1000 حرف. (نص الاختبار في القاعدة مكتوب بصيغة شرط الخطأ: يُطلق الخطأ عندما يزيد الطول عن 1000 أو يقل عن 1.) | اجعل قيمة QR بترميز Base64 في cbc:EmbeddedDocumentBinaryObject غير فارغة ولا تتجاوز 1000 حرف. | conditional | [
"KSA-14"
] | https://matheel.app/en/zatca-errors/br-cl-ksa-14 | https://matheel.app/akhta/br-cl-ksa-14 |
BR-CO-04 | error | EN 16931 (CEN) rules | [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151). | not((cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID)) | Every invoice line needs a VAT category code | كل بند في الفاتورة يحتاج رمز فئة ضريبة القيمة المضافة | Each cac:InvoiceLine (or cac:CreditNoteLine) must contain cac:Item/cac:ClassifiedTaxCategory with cac:TaxScheme/cbc:ID = 'VAT' and a cbc:ID holding the item's VAT category code (BT-151). | Inside each line's cac:Item add `<cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>15.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory>`, using the category code and rate that apply to the item. | يتحقق من أن كل cac:InvoiceLine (أو cac:CreditNoteLine) يحتوي على cac:Item/cac:ClassifiedTaxCategory بقيمة cac:TaxScheme/cbc:ID = 'VAT' وعلى cbc:ID يحمل رمز فئة ضريبة الصنف (BT-151). | داخل cac:Item في كل بند أضف `<cac:ClassifiedTaxCategory><cbc:ID>S</cbc:ID><cbc:Percent>15.00</cbc:Percent><cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme></cac:ClassifiedTaxCategory>` مع رمز الفئة والنسبة المنطبقين على الصنف. | all | [
"BG-25",
"BT-151"
] | https://matheel.app/en/zatca-errors/br-co-04 | https://matheel.app/akhta/br-co-04 |
BR-CO-10 | warning | EN 16931 (CEN) rules | [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). | not((xs:decimal(cbc:LineExtensionAmount) = xs:decimal(round(sum(//(cac:InvoiceLine|cac:CreditNoteLine)/xs:decimal(cbc:LineExtensionAmount)) * 10 * 10) div 100))) | Total line amount must equal the sum of all line net amounts | إجمالي مبالغ البنود يجب أن يساوي مجموع صافي البنود | cac:LegalMonetaryTotal/cbc:LineExtensionAmount (BT-106) must equal the sum of cbc:LineExtensionAmount (BT-131) across all cac:InvoiceLine / cac:CreditNoteLine elements, rounded to two decimals. | Set cac:LegalMonetaryTotal/cbc:LineExtensionAmount to the sum of every line's cbc:LineExtensionAmount, rounded to 2 decimals. | يتحقق من أن cac:LegalMonetaryTotal/cbc:LineExtensionAmount (BT-106) يساوي مجموع cbc:LineExtensionAmount (BT-131) لجميع عناصر cac:InvoiceLine أو cac:CreditNoteLine، مقرّباً إلى منزلتين عشريتين. | اجعل قيمة cac:LegalMonetaryTotal/cbc:LineExtensionAmount مساوية لمجموع cbc:LineExtensionAmount في كل البنود، مقرّباً إلى منزلتين عشريتين. | all | [
"BT-106",
"BT-131"
] | https://matheel.app/en/zatca-errors/br-co-10 | https://matheel.app/akhta/br-co-10 |
BR-CO-11 | error | EN 16931 (CEN) rules | [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). | not(xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]))) | Allowance total must equal the sum of document-level allowances | إجمالي الخصومات يجب أن يساوي مجموع خصومات مستوى المستند | cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount (BT-107) must equal the sum of cbc:Amount (BT-92) of the document-level cac:AllowanceCharge elements with cbc:ChargeIndicator = false, rounded to two decimals. It also passes when there is neither an AllowanceTotalAmount nor any document-level allowance. | Set cbc:AllowanceTotalAmount to the rounded sum of all document-level allowance amounts, or omit it when the invoice has no document-level allowances. | يتحقق من أن cac:LegalMonetaryTotal/cbc:AllowanceTotalAmount (BT-107) يساوي مجموع cbc:Amount (BT-92) لعناصر cac:AllowanceCharge على مستوى المستند التي فيها cbc:ChargeIndicator = false، مقرّباً إلى منزلتين عشريتين. وتنجح القاعدة أيضاً إذا لم يوجد AllowanceTotalAmount ولا أي خصم على مستوى المستند. | اجعل cbc:AllowanceTotalAmount مساوياً لمجموع مبالغ خصومات مستوى المستند بعد التقريب، أو احذفه إذا لم تحتوِ الفاتورة على خصومات على مستوى المستند. | all | [
"BT-107",
"BT-92"
] | https://matheel.app/en/zatca-errors/br-co-11 | https://matheel.app/akhta/br-co-11 |
BR-CO-12 | error | EN 16931 (CEN) rules | [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). | not(xs:decimal(cbc:AllowanceTotalAmount) = (round(sum(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]/xs:decimal(cbc:Amount)) * 10 * 10) div 100) or (not(cbc:AllowanceTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=false()]))) | Charge total must equal the sum of document-level charges | إجمالي الرسوم يجب أن يساوي مجموع رسوم مستوى المستند | In SDK 3.4.8 the executed check compares cac:LegalMonetaryTotal/cbc:ChargeTotalAmount (BT-108) with the sum of cbc:Amount (BT-99) of document-level cac:AllowanceCharge elements with cbc:ChargeIndicator = true, rounded to two decimals; it passes if both are absent and fails if ChargeTotalAmount is present but empty. The... | Set cbc:ChargeTotalAmount to the rounded sum of all document-level charge amounts, or omit the element entirely when there are no document-level charges (do not leave it empty). | في الإصدار SDK 3.4.8 يقارن الفحص الفعلي قيمة cac:LegalMonetaryTotal/cbc:ChargeTotalAmount (BT-108) بمجموع cbc:Amount (BT-99) لعناصر cac:AllowanceCharge على مستوى المستند التي فيها cbc:ChargeIndicator = true، مقرّباً إلى منزلتين عشريتين؛ وينجح إذا غاب الاثنان، ويفشل إذا وُجد ChargeTotalAmount فارغاً. نص الاختبار المدرج ... | اجعل cbc:ChargeTotalAmount مساوياً لمجموع مبالغ رسوم مستوى المستند بعد التقريب، أو احذف العنصر كلياً إذا لم توجد رسوم على مستوى المستند (لا تتركه فارغاً). | all | [
"BT-108",
"BT-99"
] | https://matheel.app/en/zatca-errors/br-co-12 | https://matheel.app/akhta/br-co-12 |
BR-CO-13 | warning | EN 16931 (CEN) rules | [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). | not(xs:decimal(cbc:ChargeTotalAmount) = ( round ( sum(../cac:AllowanceCharge[cbc:ChargeIndicator=true()]/xs:decimal(cbc:Amount)) * 10 * 10)div 100 ) or ( not(cbc:ChargeTotalAmount) and not(../cac:AllowanceCharge[cbc:ChargeIndicator=true()]))) | Total without VAT = line amounts - allowances + charges | الإجمالي دون الضريبة = البنود - الخصومات + الرسوم | cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount (BT-109) must equal the sum of the lines' cbc:LineExtensionAmount, plus cbc:ChargeTotalAmount, minus cbc:AllowanceTotalAmount (each only if present), rounded to two decimals. The executed check sums the line amounts directly (the listed test text uses the BT-106 total inste... | Compute cbc:TaxExclusiveAmount as Σ line cbc:LineExtensionAmount − cbc:AllowanceTotalAmount + cbc:ChargeTotalAmount, rounded to 2 decimals. | يتحقق من أن cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount (BT-109) يساوي مجموع cbc:LineExtensionAmount للبنود، زائد cbc:ChargeTotalAmount، ناقص cbc:AllowanceTotalAmount (كلٌّ منهما إن وُجد)، مقرّباً إلى منزلتين عشريتين. الفحص الفعلي يجمع مبالغ البنود مباشرة (بينما نص الاختبار المدرج يستخدم الإجمالي BT-106)، ويعطي تحذير... | احسب cbc:TaxExclusiveAmount على أنه مجموع cbc:LineExtensionAmount للبنود − cbc:AllowanceTotalAmount + cbc:ChargeTotalAmount، مقرّباً إلى منزلتين عشريتين. | all | [
"BT-109",
"BT-131",
"BT-107",
"BT-108"
] | https://matheel.app/en/zatca-errors/br-co-13 | https://matheel.app/akhta/br-co-13 |
BR-CO-14 | error | EN 16931 (CEN) rules | [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). | not((xs:decimal(child::cbc:TaxAmount)= round((sum(cac:TaxSubtotal/xs:decimal(cbc:TaxAmount)) * 10 * 10)) div 100) or not(cac:TaxSubtotal)) | Total VAT must equal the sum of the VAT breakdown amounts | إجمالي الضريبة يجب أن يساوي مجموع مبالغ تفصيل الضريبة | For each cac:TaxTotal, cbc:TaxAmount (BT-110) must equal the sum of cbc:TaxAmount (BT-117) of its cac:TaxSubtotal children, rounded to two decimals. A cac:TaxTotal with no cac:TaxSubtotal is not checked. | In the cac:TaxTotal that carries the breakdown, set cbc:TaxAmount to the sum of its cac:TaxSubtotal/cbc:TaxAmount values, rounded to 2 decimals. | يتحقق في كل cac:TaxTotal من أن cbc:TaxAmount (BT-110) يساوي مجموع cbc:TaxAmount (BT-117) في عناصر cac:TaxSubtotal التابعة له، مقرّباً إلى منزلتين عشريتين. ولا يُفحص cac:TaxTotal الذي لا يحتوي على cac:TaxSubtotal. | في cac:TaxTotal الذي يحمل التفصيل، اجعل cbc:TaxAmount مساوياً لمجموع قيم cac:TaxSubtotal/cbc:TaxAmount، مقرّباً إلى منزلتين عشريتين. | all | [
"BT-110",
"BT-117"
] | https://matheel.app/en/zatca-errors/br-co-14 | https://matheel.app/akhta/br-co-14 |
BR-CO-15 | error | EN 16931 (CEN) rules | [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). | not(every $Currency in cbc:DocumentCurrencyCode satisfies (count(cac:TaxTotal/xs:decimal(cbc:TaxAmount[@currencyID=$Currency])) >= 1) and (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxInclusiveAmount) = round( (cac:LegalMonetaryTotal/xs:decimal(cbc:TaxExclusiveAmount) + sum(cac:TaxTotal/cac:TaxSubtotal/xs:decimal(cbc:TaxAm... | Total with VAT must equal total without VAT plus total VAT | الإجمالي مع الضريبة = الإجمالي دون الضريبة + الضريبة | The document must have at least one cac:TaxTotal/cbc:TaxAmount whose @currencyID equals cbc:DocumentCurrencyCode, and cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount (BT-112) must equal cbc:TaxExclusiveAmount (BT-109) plus the sum of all cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount values, rounded to two decimals. | Set cbc:TaxInclusiveAmount = cbc:TaxExclusiveAmount + Σ cac:TaxSubtotal/cbc:TaxAmount (rounded to 2 decimals), and give at least one cac:TaxTotal/cbc:TaxAmount the document currency, e.g. `<cbc:TaxAmount currencyID="SAR">`. | يتحقق من وجود cac:TaxTotal/cbc:TaxAmount واحد على الأقل تساوي فيه @currencyID قيمة cbc:DocumentCurrencyCode، ومن أن cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount (BT-112) يساوي cbc:TaxExclusiveAmount (BT-109) زائد مجموع كل قيم cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount، مقرّباً إلى منزلتين عشريتين. | اجعل cbc:TaxInclusiveAmount = cbc:TaxExclusiveAmount + مجموع cac:TaxSubtotal/cbc:TaxAmount (مقرّباً إلى منزلتين)، واجعل عملة cac:TaxTotal/cbc:TaxAmount واحد على الأقل هي عملة المستند، مثل `<cbc:TaxAmount currencyID="SAR">`. | all | [
"BT-112",
"BT-109",
"BT-110"
] | https://matheel.app/en/zatca-errors/br-co-15 | https://matheel.app/akhta/br-co-15 |
BR-CO-16 | warning | EN 16931 (CEN) rules | [BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114). | not(( not(exists(cbc:PayableRoundingAmount)) and (xs:decimal(cbc:PayableAmount) = (round((xs:decimal(cbc:TaxInclusiveAmount) - xs:decimal(cbc:PrepaidAmount)) * 10 * 10) div 100))) or (not(exists(cbc:PrepaidAmount)) and not(exists(cbc:PayableRoundingAmount)) and xs:decimal(cbc:PayableAmount) = xs:decimal(cbc:TaxInclusiv... | Amount due = total with VAT - prepaid amount + rounding amount | المستحق = الإجمالي مع الضريبة - المدفوع مقدماً + التقريب | cac:LegalMonetaryTotal/cbc:PayableAmount (BT-115) must equal cbc:TaxInclusiveAmount (BT-112) minus cbc:PrepaidAmount (BT-113) plus cbc:PayableRoundingAmount (BT-114), where the prepaid and rounding amounts count only if present; values are compared after rounding to two decimals. | Set cbc:PayableAmount = cbc:TaxInclusiveAmount − cbc:PrepaidAmount + cbc:PayableRoundingAmount (leave out any term whose element is absent). | يتحقق من أن cac:LegalMonetaryTotal/cbc:PayableAmount (BT-115) يساوي cbc:TaxInclusiveAmount (BT-112) ناقص cbc:PrepaidAmount (BT-113) زائد cbc:PayableRoundingAmount (BT-114)، ولا يُحتسب المبلغ المدفوع مقدماً ومبلغ التقريب إلا عند وجودهما؛ وتتم المقارنة بعد التقريب إلى منزلتين عشريتين. | اجعل cbc:PayableAmount = cbc:TaxInclusiveAmount − cbc:PrepaidAmount + cbc:PayableRoundingAmount (مع إسقاط أي حد لا يوجد عنصره). | all | [
"BT-115",
"BT-112",
"BT-113",
"BT-114"
] | https://matheel.app/en/zatca-errors/br-co-16 | https://matheel.app/akhta/br-co-16 |
BR-CO-17 | warning | EN 16931 (CEN) rules | [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. | not(($taxAmount >= $upperLimit and $taxAmount <= $lowerLimit) or ($taxAmount = $shouldBe)) | VAT amount per category must equal taxable amount x rate | ضريبة كل فئة يجب أن تساوي المبلغ الخاضع × النسبة | For each /ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal, cbc:TaxAmount (BT-117) must equal cbc:TaxableAmount (BT-116) × cac:TaxCategory/cbc:Percent (BT-119) / 100, rounded to two decimals. The executed check allows a tolerance of 0.01 per invoice line (number of lines × 0.01); the listed test text describes a ±1 tolerance i... | Compute each subtotal's cbc:TaxAmount as round(cbc:TaxableAmount × cbc:Percent / 100, 2), using the same cbc:Percent that appears in that subtotal's cac:TaxCategory. | يتحقق في كل /ubl:Invoice/cac:TaxTotal/cac:TaxSubtotal من أن cbc:TaxAmount (BT-117) يساوي cbc:TaxableAmount (BT-116) × cac:TaxCategory/cbc:Percent (BT-119) / 100، مقرّباً إلى منزلتين عشريتين. الفحص الفعلي يسمح بفارق 0.01 لكل بند في الفاتورة (عدد البنود × 0.01)، بينما يصف نص الاختبار المدرج فارقاً قدره ±1. | احسب cbc:TaxAmount لكل تفصيل على أنه round(cbc:TaxableAmount × cbc:Percent / 100, 2)، باستخدام نفس cbc:Percent الموجود في cac:TaxCategory لذلك التفصيل. | all | [
"BT-117",
"BT-116",
"BT-119"
] | https://matheel.app/en/zatca-errors/br-co-17 | https://matheel.app/akhta/br-co-17 |
BR-CO-18 | error | EN 16931 (CEN) rules | [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). | not(exists(cac:TaxTotal/cac:TaxSubtotal)) | Every invoice needs at least one VAT breakdown | كل فاتورة تحتاج تفصيلاً واحداً على الأقل للضريبة | The document must contain at least one cac:TaxTotal/cac:TaxSubtotal (VAT breakdown, BG-23). | Add a cac:TaxSubtotal (with cbc:TaxableAmount, cbc:TaxAmount and cac:TaxCategory) inside cac:TaxTotal for each VAT category used on the invoice. | يتحقق من أن المستند يحتوي على cac:TaxTotal/cac:TaxSubtotal واحد على الأقل (تفصيل ضريبة القيمة المضافة BG-23). | أضف cac:TaxSubtotal (يحتوي على cbc:TaxableAmount و cbc:TaxAmount و cac:TaxCategory) داخل cac:TaxTotal لكل فئة ضريبية مستخدمة في الفاتورة. | all | [
"BG-23"
] | https://matheel.app/en/zatca-errors/br-co-18 | https://matheel.app/akhta/br-co-18 |
BR-CUSTOM-VALIDATION-01 | error | ZATCA KSA rules | [BR-CUSTOM-VALIDATION-01]- The Seller VAT registration number or seller group VAT registration number (BT-31) of The invoice must not match the buyer VAT registration number (BT-48) . | (( (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) != '' and (cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) != '' and (cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) = (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) )) | Seller and buyer VAT numbers must not be the same | الرقم الضريبي للبائع يجب ألا يطابق الرقم الضريبي للمشتري | Applies when both cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-31) and cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-48) are non-empty: the two values must differ. (The rule's test text is written as the failure condition: it fires when both are filled and equa... | Put the buyer's own VAT registration number in the buyer's cac:PartyTaxScheme/cbc:CompanyID, not the seller's. | تنطبق عندما تكون قيمتا cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-31) و cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-48) غير فارغتين: يجب أن تختلفا. (نص الاختبار في القاعدة مكتوب بصيغة شرط الخطأ: يُطلق الخطأ عندما تكون القيمتان معبأتين ومتساويتين.) | ضع الرقم الضريبي الخاص بالمشتري في cac:PartyTaxScheme/cbc:CompanyID للمشتري، وليس رقم البائع. | conditional | [
"BT-31",
"BT-48"
] | https://matheel.app/en/zatca-errors/br-custom-validation-01 | https://matheel.app/akhta/br-custom-validation-01 |
BR-DEC-01 | warning | EN 16931 (CEN) rules | [BR-DEC-01]-The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2. | not(string-length(substring-after(cbc:Amount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-02 | warning | EN 16931 (CEN) rules | [BR-DEC-02]-The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2. | not(string-length(substring-after(cbc:BaseAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-05 | warning | EN 16931 (CEN) rules | [BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2. | not(string-length(substring-after(cbc:Amount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-06 | warning | EN 16931 (CEN) rules | [BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2. | not(string-length(substring-after(cbc:BaseAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-09 | warning | EN 16931 (CEN) rules | [BR-DEC-09]-The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2. | string-length(substring-after(cbc:LineExtensionAmount,'.')) > 2 | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-10 | warning | EN 16931 (CEN) rules | [BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2. | not(string-length(substring-after(cbc:AllowanceTotalAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-11 | warning | EN 16931 (CEN) rules | [BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2. | not(string-length(substring-after(cbc:ChargeTotalAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-12 | warning | EN 16931 (CEN) rules | [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. | not(string-length(substring-after(cbc:TaxExclusiveAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-13 | warning | EN 16931 (CEN) rules | [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. | not((string-length(substring-after(.,'.'))<=2)) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-14 | warning | EN 16931 (CEN) rules | [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. | not(string-length(substring-after(cbc:TaxInclusiveAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-15 | warning | EN 16931 (CEN) rules | [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. | not((string-length(substring-after(.,'.'))<=2)) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-16 | warning | EN 16931 (CEN) rules | [BR-DEC-16]-The allowed maximum number of decimals for the Pre-Paid amount (BT-113) is 2. | not(string-length(substring-after(cbc:PrepaidAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-17 | warning | EN 16931 (CEN) rules | [BR-DEC-17]-The allowed maximum number of decimals for the Rounding amount (BT-114) is 2. | not(string-length(substring-after(cbc:PayableRoundingAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-18 | warning | EN 16931 (CEN) rules | [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. | not(string-length(substring-after(cbc:PayableAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-19 | warning | EN 16931 (CEN) rules | [BR-DEC-19]-The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2. | not(string-length(substring-after(cbc:TaxableAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-20 | warning | EN 16931 (CEN) rules | [BR-DEC-20]-The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2. | not(string-length(substring-after(cbc:TaxAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-23 | warning | EN 16931 (CEN) rules | [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. | not(string-length(substring-after(cbc:LineExtensionAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-24 | warning | EN 16931 (CEN) rules | [BR-DEC-24]-The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2. | not(string-length(substring-after(cbc:Amount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-25 | warning | EN 16931 (CEN) rules | [BR-DEC-25]-The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2. | not(string-length(substring-after(cbc:BaseAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-27 | warning | EN 16931 (CEN) rules | [BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2. | not(string-length(substring-after(./cbc:Amount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-DEC-28 | warning | EN 16931 (CEN) rules | [BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2. | not(string-length(substring-after(./cbc:BaseAmount,'.'))<=2) | null | null | null | null | null | null | null | null | https://matheel.app/en/zatca-errors/br-dec | https://matheel.app/akhta/br-dec |
BR-E-01 | warning | EN 16931 (CEN) rules | [BR-E-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151 or BT-95 or BT-102) is "Exempt from VAT" shall contain at least one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". | not(((exists(//cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxC... | Exempt (E) items need an 'E' VAT breakdown | البنود المعفاة (E) تحتاج تفصيل ضريبة بالفئة E | Applies when any line cac:ClassifiedTaxCategory or document-level cac:AllowanceCharge/cac:TaxCategory (with TaxScheme 'VAT') has cbc:ID = 'E': the document must then have at least one cac:TaxTotal/cac:TaxSubtotal whose cac:TaxCategory/cbc:ID is 'E'. The executed check requires at least one; the listed test text says ex... | Add a cac:TaxSubtotal whose cac:TaxCategory has `<cbc:ID>E</cbc:ID>` and the VAT tax scheme, covering the exempt lines, allowances and charges. | تنطبق عندما يكون cbc:ID = 'E' في أي cac:ClassifiedTaxCategory لبند أو في cac:AllowanceCharge/cac:TaxCategory على مستوى المستند (بنظام ضريبي 'VAT'): عندها يجب أن يحتوي المستند على cac:TaxTotal/cac:TaxSubtotal واحد على الأقل قيمة cac:TaxCategory/cbc:ID فيه 'E'. الفحص الفعلي يشترط واحداً على الأقل، بينما يذكر نص الاختبار ... | أضف cac:TaxSubtotal يحتوي cac:TaxCategory فيه على `<cbc:ID>E</cbc:ID>` ونظام ضريبة VAT، ليغطي البنود والخصومات والرسوم المعفاة. | conditional | [
"BG-25",
"BG-20",
"BG-21",
"BT-151",
"BT-95",
"BT-102",
"BG-23",
"BT-118"
] | https://matheel.app/en/zatca-errors/br-e-01 | https://matheel.app/akhta/br-e-01 |
BR-E-05 | error | EN 16931 (CEN) rules | [BR-E-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT", the Invoiced item VAT rate (BT-152) shall be 0 (zero). | not((xs:decimal(cbc:Percent) = 0)) | Exempt (E) invoice lines must have a VAT rate of 0 | بنود الفاتورة المعفاة (E) يجب أن تكون نسبة ضريبتها 0 | Applies to each line cac:Item/cac:ClassifiedTaxCategory with cbc:ID = 'E' and TaxScheme 'VAT': its cbc:Percent (BT-152) must equal 0. | For exempt lines use `<cbc:ID>E</cbc:ID><cbc:Percent>0</cbc:Percent>` inside cac:ClassifiedTaxCategory. | تنطبق على كل cac:Item/cac:ClassifiedTaxCategory لبند فيه cbc:ID = 'E' ونظام ضريبي 'VAT': يجب أن تساوي قيمة cbc:Percent (BT-152) صفراً. | في البنود المعفاة استخدم `<cbc:ID>E</cbc:ID><cbc:Percent>0</cbc:Percent>` داخل cac:ClassifiedTaxCategory. | conditional | [
"BG-25",
"BT-151",
"BT-152"
] | https://matheel.app/en/zatca-errors/br-e-05 | https://matheel.app/akhta/br-e-05 |
BR-E-06 | error | EN 16931 (CEN) rules | [BR-E-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT", the Document level allowance VAT rate (BT-96) shall be 0 (zero). | not((xs:decimal(cbc:Percent) = 0)) | Exempt (E) document allowances must have a VAT rate of 0 | خصومات المستند المعفاة (E) يجب أن تكون نسبة ضريبتها 0 | Applies to each document-level cac:AllowanceCharge with cbc:ChargeIndicator = false whose cac:TaxCategory has cbc:ID = 'E' and TaxScheme 'VAT': that cac:TaxCategory/cbc:Percent (BT-96) must equal 0. | In the allowance's cac:TaxCategory use `<cbc:ID>E</cbc:ID><cbc:Percent>0</cbc:Percent>`. | تنطبق على كل cac:AllowanceCharge على مستوى المستند فيه cbc:ChargeIndicator = false وقيمة cbc:ID في cac:TaxCategory هي 'E' بنظام ضريبي 'VAT': يجب أن تساوي cac:TaxCategory/cbc:Percent (BT-96) صفراً. | في cac:TaxCategory الخاص بالخصم استخدم `<cbc:ID>E</cbc:ID><cbc:Percent>0</cbc:Percent>`. | conditional | [
"BG-20",
"BT-95",
"BT-96"
] | https://matheel.app/en/zatca-errors/br-e-06 | https://matheel.app/akhta/br-e-06 |
BR-E-07 | error | EN 16931 (CEN) rules | [BR-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). | cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'] and not(((/ubl:Invoice/cac:AllowanceCharge/cac:TaxCategory /cbc:Percent)=0)) | Exempt (E) document charges must have a VAT rate of 0 | رسوم المستند المعفاة (E) يجب أن تكون نسبة ضريبتها 0 | Applies when the document has a document-level cac:AllowanceCharge with cbc:ChargeIndicator = true whose cac:TaxCategory has cbc:ID = 'E' (VAT): the charge rate cbc:Percent (BT-103) should be 0. In SDK 3.4.8 the executed check is looser: it passes as long as any document-level cac:AllowanceCharge/cac:TaxCategory/cbc:Pe... | In the charge's cac:TaxCategory use `<cbc:ID>E</cbc:ID><cbc:Percent>0</cbc:Percent>`. | تنطبق عندما يحتوي المستند على cac:AllowanceCharge على مستوى المستند فيه cbc:ChargeIndicator = true وقيمة cbc:ID في cac:TaxCategory هي 'E' (VAT): يجب أن تكون نسبة الرسم cbc:Percent (BT-103) صفراً. في الإصدار SDK 3.4.8 الفحص الفعلي أخف من ذلك: ينجح ما دامت أي قيمة cac:AllowanceCharge/cac:TaxCategory/cbc:Percent على مستوى... | في cac:TaxCategory الخاص بالرسم استخدم `<cbc:ID>E</cbc:ID><cbc:Percent>0</cbc:Percent>`. | conditional | [
"BG-21",
"BT-102",
"BT-103"
] | https://matheel.app/en/zatca-errors/br-e-07 | https://matheel.app/akhta/br-e-07 |
BR-E-08 | warning | EN 16931 (CEN) rules | [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT ... | count(/*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])> 0 and not(exists(../../../cac:AllowanceCharge/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'E']) or exists(../../../cac:... | Exempt (E) taxable amount must match the exempt lines and adjustments | المبلغ الخاضع للفئة E يجب أن يطابق البنود والتعديلات المعفاة | Applies to each cac:TaxSubtotal whose cac:TaxCategory/cbc:ID is 'E': its cbc:TaxableAmount (BT-116) must equal the sum of cbc:LineExtensionAmount of lines with category 'E' plus 'E' document-level charges minus 'E' document-level allowances. The executed check also warns when an 'E' breakdown exists but no line, allowa... | Set the 'E' subtotal's cbc:TaxableAmount to Σ exempt line amounts + Σ exempt document charges − Σ exempt document allowances, and include an 'E' breakdown only when something on the invoice is exempt. | تنطبق على كل cac:TaxSubtotal قيمة cac:TaxCategory/cbc:ID فيه 'E': يجب أن يساوي cbc:TaxableAmount (BT-116) مجموع cbc:LineExtensionAmount للبنود ذات الفئة 'E' زائد رسوم مستوى المستند بالفئة 'E' ناقص خصومات مستوى المستند بالفئة 'E'. الفحص الفعلي يعطي تحذيراً أيضاً عند وجود تفصيل 'E' دون أي بند أو خصم أو رسم بالفئة 'E'؛ ون... | اجعل cbc:TaxableAmount لتفصيل 'E' مساوياً لمجموع مبالغ البنود المعفاة + رسوم المستند المعفاة − خصومات المستند المعفاة، ولا تضف تفصيل 'E' إلا إذا كان في الفاتورة شيء معفى. | conditional | [
"BG-23",
"BT-118",
"BT-116",
"BT-131",
"BT-92",
"BT-99",
"BT-151",
"BT-95",
"BT-102"
] | https://matheel.app/en/zatca-errors/br-e-08 | https://matheel.app/akhta/br-e-08 |
BR-E-09 | error | EN 16931 (CEN) rules | [BR-E-09]-The VAT category tax amount (BT-117) In a VAT breakdown (BG-23) where the VAT category code (BT-118) equals "Exempt from VAT" shall equal 0 (zero). | not(xs:decimal(../cbc:TaxAmount) = 0) | VAT amount in an exempt (E) breakdown must be 0 | مبلغ الضريبة في تفصيل الفئة المعفاة (E) يجب أن يكون 0 | Applies to each cac:TaxTotal/cac:TaxSubtotal whose cac:TaxCategory/cbc:ID is 'E' (VAT): that subtotal's cbc:TaxAmount (BT-117) must equal 0. | In the 'E' subtotal use `<cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>` (with your document currency). | تنطبق على كل cac:TaxTotal/cac:TaxSubtotal قيمة cac:TaxCategory/cbc:ID فيه 'E' (VAT): يجب أن يساوي cbc:TaxAmount (BT-117) لذلك التفصيل صفراً. | في تفصيل 'E' استخدم `<cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>` (بعملة المستند الخاصة بك). | conditional | [
"BT-117",
"BG-23",
"BT-118"
] | https://matheel.app/en/zatca-errors/br-e-09 | https://matheel.app/akhta/br-e-09 |
BR-KSA-03 | error | ZATCA KSA rules | [BR-KSA-03]-The invoice must contain a unique identifier ("UUID") (KSA-1) given by the unit that issued the document (unique message identifier for interchange process). This value must contain only letters, digits, and dashes. | not(exists(cbc:UUID) and (cbc:UUID) != '' and matches(cbc:UUID, '^[\w.-]+')) | Every invoice needs a UUID | كل فاتورة تحتاج معرّفاً فريداً UUID | The document must have a non-empty cbc:UUID (KSA-1). The executed regex '^[\w.-]+' only checks that the value starts with a letter, digit, underscore, dot or dash, so it is looser than the official text's 'only letters, digits and dashes'. | Generate a standard UUID and add it near the top of the document, e.g. `<cbc:UUID>3cf5ee18-ee25-44ea-a444-2c37ba7f28be</cbc:UUID>`. | يتحقق من وجود cbc:UUID (KSA-1) غير فارغ في المستند. التعبير النمطي المنفّذ '^[\w.-]+' يتحقق فقط من أن القيمة تبدأ بحرف أو رقم أو شرطة سفلية أو نقطة أو شرطة، فهو أخف من النص الرسمي الذي يشترط أحرفاً وأرقاماً وشرطات فقط. | أنشئ UUID قياسياً وأضفه في أعلى المستند، مثل `<cbc:UUID>3cf5ee18-ee25-44ea-a444-2c37ba7f28be</cbc:UUID>`. | all | [
"KSA-1"
] | https://matheel.app/en/zatca-errors/br-ksa-03 | https://matheel.app/akhta/br-ksa-03 |
BR-KSA-04 | error | ZATCA KSA rules | [BR-KSA-04]-The document issue date (BT-2) must be less or equal to the current date. | ((. castable as xs:date ) and normalize-space(.)!='') and xs:date(.) > current-date() | Issue date must not be in the future | تاريخ الإصدار يجب ألا يكون في المستقبل | cbc:IssueDate (BT-2), when it is a valid date, must be on or before the current date at the time of validation. | Set cbc:IssueDate to the actual issue date in YYYY-MM-DD format, e.g. `<cbc:IssueDate>2022-09-07</cbc:IssueDate>`, never a later date. | يتحقق من أن cbc:IssueDate (BT-2)، عندما يكون تاريخاً صالحاً، يساوي التاريخ الحالي وقت التحقق أو يسبقه. | اجعل cbc:IssueDate تاريخ الإصدار الفعلي بصيغة YYYY-MM-DD، مثل `<cbc:IssueDate>2022-09-07</cbc:IssueDate>`، ولا تضع تاريخاً لاحقاً. | all | [
"BT-2"
] | https://matheel.app/en/zatca-errors/br-ksa-04 | https://matheel.app/akhta/br-ksa-04 |
BR-KSA-05 | error | ZATCA KSA rules | [BR-KSA-05]-The invoice type code (BT-3) must be equal to one of value from the subset of UN/CEFACT code list 1001, D.16B agreed for KSA electronic invoices. Please refer paragraph 11.2.1 of XML implementation Standards. | not(not(contains(normalize-space(.), ' ')) and contains(' 388 383 381 386 ', concat(' ', normalize-space(.), ' '))) | Invoice type code must be 388, 383, 381 or 386 | رمز نوع الفاتورة يجب أن يكون 388 أو 383 أو 381 أو 386 | cbc:InvoiceTypeCode (BT-3) must be a single value from the KSA subset of UN/CEFACT 1001. The executed check accepts 388 (tax invoice), 383 (debit note), 381 (credit note) and 386 (prepayment invoice); the listed test text omits 386. | Use one of these values with no spaces, e.g. `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>`. | يتحقق من أن cbc:InvoiceTypeCode (BT-3) قيمة واحدة من المجموعة الفرعية السعودية لقائمة UN/CEFACT 1001. الفحص الفعلي يقبل 388 (فاتورة ضريبية) و383 (إشعار مدين) و381 (إشعار دائن) و386 (فاتورة دفعة مقدمة)؛ ونص الاختبار المدرج لا يذكر 386. | استخدم إحدى هذه القيم دون مسافات، مثل `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>`. | all | [
"BT-3"
] | https://matheel.app/en/zatca-errors/br-ksa-05 | https://matheel.app/akhta/br-ksa-05 |
BR-KSA-06 | error | ZATCA KSA rules | [BR-KSA-06]-The invoice transaction code (KSA-2) must exist and respect the following structure: NNPNESBCG 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 transa... | not( ( ( (string-length(@name) = 7 and (substring(@name,1,2) = '01' or substring(@name,1,2) = '02') and (substring(@name,3,1) = '0' or substring(@name,3,1) = '1') and (substring(@name,4,1) = '0' or substring(@name,4,1) = '1') and (substring(@name,5,1) = '0' or substring(@name,5,1) = '1') and (substring(@name,6,1) = '0'... | Invoice transaction code (name attribute) must follow NNPNESB | رمز معاملة الفاتورة (السمة name) يجب أن يتبع الصيغة NNPNESB | The @name attribute of cbc:InvoiceTypeCode (KSA-2) must start with '01' (tax invoice) or '02' (simplified), followed by 0/1 flags: 3rd-party, nominal, export, summary, self-billed (positions 3–7). The executed check accepts 7, 8 or 9 characters (positions 8–9, continuous supply and B2G, also 0/1); the listed test text ... | Set the name attribute, e.g. `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>` for a plain standard invoice or name="0200000" for a simplified one. | يتحقق من أن السمة @name في cbc:InvoiceTypeCode (KSA-2) تبدأ بـ '01' (فاتورة ضريبية) أو '02' (مبسطة)، تليها علامات 0/1: طرف ثالث، اسمية، تصدير، ملخصة، فوترة ذاتية (المواضع 3–7). الفحص الفعلي يقبل 7 أو 8 أو 9 خانات (الموضعان 8–9: توريد مستمر وB2G، وقيمتهما 0/1 أيضاً)؛ ونص الاختبار المدرج يسمح بـ 7 خانات فقط. | اضبط السمة name، مثل `<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>` للفاتورة الضريبية العادية، أو name="0200000" للفاتورة المبسطة. | all | [
"KSA-2"
] | https://matheel.app/en/zatca-errors/br-ksa-06 | https://matheel.app/akhta/br-ksa-06 |
BR-KSA-07 | error | ZATCA KSA rules | [BR-KSA-07]-Self billing is not allowed (KSA-2, position 7 cannot be "1") for export invoices (KSA-2, position 5 = 1). | not(substring(./@name,7,1) != '1') | Export invoices cannot be self-billed | فواتير التصدير لا يجوز أن تكون فوترة ذاتية | Applies when position 5 (export) of cbc:InvoiceTypeCode/@name (KSA-2) is '1': position 7 (self-billed) must then not be '1'. | For an export invoice set position 7 of the name attribute to 0, e.g. name="0100100". | تنطبق عندما يكون الموضع 5 (تصدير) في cbc:InvoiceTypeCode/@name (KSA-2) مساوياً '1': عندها يجب ألا يكون الموضع 7 (فوترة ذاتية) '1'. | في فاتورة التصدير اجعل الموضع 7 في السمة name صفراً، مثل name="0100100". | conditional | [
"KSA-2"
] | https://matheel.app/en/zatca-errors/br-ksa-07 | https://matheel.app/akhta/br-ksa-07 |
BR-KSA-08 | warning | ZATCA KSA rules | [BR-KSA-08]-The seller identification (BT-29) must exist only once with one of the scheme ID (BT-29-1) (CRN, MOM, MLS, SAG, OTH, 700) and must contain only alphanumeric characters. Commercial Registration number with "CRN" as schemeID. MOMRAH license with "MOM" as schemeID. MHRSD license with "MLS" as schemeID. 700 Num... | not( exists(cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID) and string-length(cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID/normalize-space(@schemeID)) > 2 and contains('CRN MOM MLS SAG OTH 700', normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/c... | Seller ID needs a valid scheme (CRN, MOM, MLS, SAG, OTH, 700) | معرّف البائع بنوع صالح (CRN, MOM, MLS, SAG, OTH, 700) | cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID (BT-29) must exist with a @schemeID (BT-29-1) of CRN, MOM, MLS, SAG, OTH or 700. The executed check only verifies the ID exists and the scheme; it does not check the 'alphanumeric only' or 'only once' parts of the official text. | Add the seller identifier with its scheme, e.g. `<cac:PartyIdentification><cbc:ID schemeID="CRN">1010010000</cbc:ID></cac:PartyIdentification>`, using letters and digits only and the first applicable scheme in the order CRN, MOM, MLS, SAG, OTH, 700 per the official text. | يتحقق من وجود cac:AccountingSupplierParty/cac:Party/cac:PartyIdentification/cbc:ID (BT-29) مع @schemeID (BT-29-1) بإحدى القيم CRN أو MOM أو MLS أو SAG أو OTH أو 700. الفحص الفعلي يتحقق فقط من وجود المعرّف ونوعه، ولا يفحص شرطي 'أحرف وأرقام فقط' و'مرة واحدة فقط' الواردين في النص الرسمي. | أضف معرّف البائع مع نوعه، مثل `<cac:PartyIdentification><cbc:ID schemeID="CRN">1010010000</cbc:ID></cac:PartyIdentification>`، بأحرف وأرقام فقط، واختر أول نوع منطبق حسب الترتيب CRN, MOM, MLS, SAG, OTH, 700 كما في النص الرسمي. | all | [
"BT-29",
"BT-29-1"
] | https://matheel.app/en/zatca-errors/br-ksa-08 | https://matheel.app/akhta/br-ksa-08 |
BR-KSA-09 | warning | ZATCA KSA rules | [BR-KSA-09]-Seller address must contain street name (BT-35), building number (KSA-17), postal code (BT-38), city (BT-37), district (KSA-3), country code (BT-40). For more information please access this link: https://splonline.com.sa/en/national-address-1/ | not(exists(cbc:StreetName) and exists(cbc:BuildingNumber) and exists(cbc:CityName) and exists(cbc:PostalZone) and exists(cbc:CitySubdivisionName) and exists(cac:Country/cbc:IdentificationCode)) | Seller address: street, building, postcode, city, district, country | عنوان البائع: الشارع والمبنى والرمز والمدينة والحي والدولة | cac:AccountingSupplierParty/cac:Party/cac:PostalAddress must contain cbc:StreetName, cbc:BuildingNumber, cbc:CityName, cbc:PostalZone, cbc:CitySubdivisionName and cac:Country/cbc:IdentificationCode. The listed test text also requires cbc:PlotIdentification, but the executed check and the official text do not. | Fill all six elements in the seller's cac:PostalAddress, e.g. `<cbc:StreetName>…</cbc:StreetName><cbc:BuildingNumber>…</cbc:BuildingNumber><cbc:CitySubdivisionName>…</cbc:CitySubdivisionName><cbc:CityName>…</cbc:CityName><cbc:PostalZone>…</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SA</cbc:IdentificationCode><... | يتحقق من أن cac:AccountingSupplierParty/cac:Party/cac:PostalAddress يحتوي على cbc:StreetName و cbc:BuildingNumber و cbc:CityName و cbc:PostalZone و cbc:CitySubdivisionName و cac:Country/cbc:IdentificationCode. نص الاختبار المدرج يشترط أيضاً cbc:PlotIdentification، لكن الفحص الفعلي والنص الرسمي لا يشترطانه. | عبّئ العناصر الستة في cac:PostalAddress للبائع، مثل `<cbc:StreetName>…</cbc:StreetName><cbc:BuildingNumber>…</cbc:BuildingNumber><cbc:CitySubdivisionName>…</cbc:CitySubdivisionName><cbc:CityName>…</cbc:CityName><cbc:PostalZone>…</cbc:PostalZone><cac:Country><cbc:IdentificationCode>SA</cbc:IdentificationCode></cac:Count... | all | [
"BT-35",
"KSA-17",
"BT-38",
"BT-37",
"KSA-3",
"BT-40"
] | https://matheel.app/en/zatca-errors/br-ksa-09 | https://matheel.app/akhta/br-ksa-09 |
BR-KSA-10 | warning | ZATCA KSA rules | [BR-KSA-10]-Where the Buyer Country Code (BT-55) is other than 'SA' Buyer address must contain a street (BT-50), city (BT-52), country code (BT-55). This rule does not apply on the simplified tax invoices and associated credit notes and debit notes (KSA-2, position 1 and 2 = 02). | not (string-length(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode) > 0 and string-length(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:StreetName) > 0 and string-length(//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cbc:CityName) > 0 and exists(//... | Standard invoices need buyer street, city and country code | الفواتير الضريبية تحتاج شارع المشتري ومدينته ورمز دولته | On standard invoices (cbc:InvoiceTypeCode/@name starting '01'), cac:AccountingCustomerParty/cac:Party/cac:PostalAddress must have non-empty cbc:StreetName, cbc:CityName and cac:Country/cbc:IdentificationCode. The executed check does not look at the country value, so it applies to Saudi buyers too, unlike the official t... | Fill the buyer's address with at least `<cbc:StreetName>…</cbc:StreetName><cbc:CityName>…</cbc:CityName><cac:Country><cbc:IdentificationCode>…</cbc:IdentificationCode></cac:Country>`. | في الفواتير الضريبية (التي تبدأ فيها cbc:InvoiceTypeCode/@name بـ '01') يجب أن يحتوي cac:AccountingCustomerParty/cac:Party/cac:PostalAddress على cbc:StreetName و cbc:CityName و cac:Country/cbc:IdentificationCode غير فارغة. الفحص الفعلي لا ينظر إلى قيمة الدولة، فينطبق على المشترين السعوديين أيضاً خلافاً للنص الرسمي؛ ولا... | عبّئ عنوان المشتري على الأقل بـ `<cbc:StreetName>…</cbc:StreetName><cbc:CityName>…</cbc:CityName><cac:Country><cbc:IdentificationCode>…</cbc:IdentificationCode></cac:Country>`. | standard | [
"BT-55",
"BT-50",
"BT-52",
"KSA-2"
] | https://matheel.app/en/zatca-errors/br-ksa-10 | https://matheel.app/akhta/br-ksa-10 |
BR-KSA-11 | error | ZATCA KSA rules | [BR-KSA-11]-An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT", an invoiced item VAT rate (BT-152) shall be 0 (zero), if exist. | (cbc:Percent >0 or cbc:Percent <0 ) | 'Not subject to VAT' (O) lines must have a VAT rate of 0 if given | البنود غير الخاضعة للضريبة (O) نسبتها 0 إن وُجدت | Applies to each line cac:Item/cac:ClassifiedTaxCategory with cbc:ID = 'O': if cbc:Percent (BT-152) is present it must be 0. The executed check fails only on a non-zero Percent, while the listed test text (not(cbc:Percent)) implies Percent must be absent. | For 'O' lines either omit cbc:Percent or set `<cbc:Percent>0</cbc:Percent>`. | تنطبق على كل cac:Item/cac:ClassifiedTaxCategory لبند فيه cbc:ID = 'O': إذا وُجد cbc:Percent (BT-152) فيجب أن يساوي 0. الفحص الفعلي يفشل فقط عند وجود نسبة غير صفرية، بينما يوحي نص الاختبار المدرج (not(cbc:Percent)) بأن النسبة يجب أن تغيب. | في بنود 'O' إما أن تحذف cbc:Percent أو تضع `<cbc:Percent>0</cbc:Percent>`. | conditional | [
"BG-25",
"BT-151",
"BT-152"
] | https://matheel.app/en/zatca-errors/br-ksa-11 | https://matheel.app/akhta/br-ksa-11 |
BR-KSA-12 | warning | ZATCA KSA rules | [BR-KSA-12]-A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT", a Document level allowance VAT rate (BT-96) shall be 0 (Zero), if exist. | (cbc:Percent >0 or cbc:Percent <0 ) | 'Not subject to VAT' (O) allowances must have a VAT rate of 0 if given | الخصومات غير الخاضعة للضريبة (O) نسبتها 0 إن وُجدت | Applies to each document-level cac:AllowanceCharge with cbc:ChargeIndicator = false whose cac:TaxCategory/cbc:ID is 'O': if cbc:Percent (BT-96) is present it must be 0. The executed check fails only on a non-zero Percent, while the listed test text implies Percent must be absent. | In the allowance's 'O' cac:TaxCategory either omit cbc:Percent or set `<cbc:Percent>0</cbc:Percent>`. | تنطبق على كل cac:AllowanceCharge على مستوى المستند فيه cbc:ChargeIndicator = false وقيمة cac:TaxCategory/cbc:ID فيه 'O': إذا وُجد cbc:Percent (BT-96) فيجب أن يساوي 0. الفحص الفعلي يفشل فقط عند وجود نسبة غير صفرية، بينما يوحي نص الاختبار المدرج بأن النسبة يجب أن تغيب. | في cac:TaxCategory بالفئة 'O' للخصم إما أن تحذف cbc:Percent أو تضع `<cbc:Percent>0</cbc:Percent>`. | conditional | [
"BG-20",
"BT-95",
"BT-96"
] | https://matheel.app/en/zatca-errors/br-ksa-12 | https://matheel.app/akhta/br-ksa-12 |
BR-KSA-13 | warning | ZATCA KSA rules | [BR-KSA-13]-A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT", a Document level charge VAT rate (BT-103) shall be 0 (zero), if exist. | (cbc:Percent >0 or cbc:Percent <0 ) | 'Not subject to VAT' (O) charges must have a VAT rate of 0 if given | الرسوم غير الخاضعة للضريبة (O) نسبتها 0 إن وُجدت | Applies to each document-level cac:AllowanceCharge with cbc:ChargeIndicator = true whose cac:TaxCategory/cbc:ID is 'O': if cbc:Percent (BT-103) is present it must be 0. The executed check fails only on a non-zero Percent, while the listed test text implies Percent must be absent. | In the charge's 'O' cac:TaxCategory either omit cbc:Percent or set `<cbc:Percent>0</cbc:Percent>`. | تنطبق على كل cac:AllowanceCharge على مستوى المستند فيه cbc:ChargeIndicator = true وقيمة cac:TaxCategory/cbc:ID فيه 'O': إذا وُجد cbc:Percent (BT-103) فيجب أن يساوي 0. الفحص الفعلي يفشل فقط عند وجود نسبة غير صفرية، بينما يوحي نص الاختبار المدرج بأن النسبة يجب أن تغيب. | في cac:TaxCategory بالفئة 'O' للرسم إما أن تحذف cbc:Percent أو تضع `<cbc:Percent>0</cbc:Percent>`. | conditional | [
"BG-21",
"BT-102",
"BT-103"
] | https://matheel.app/en/zatca-errors/br-ksa-13 | https://matheel.app/akhta/br-ksa-13 |
BR-KSA-14 | error | ZATCA KSA rules | [BR-KSA-14]-The buyer identification (BT-46), required only if buyer is not VAT registered, then the buyer identification (BT-46) must be provided with one of the scheme IDs (BT-46-1) (TIN, CRN, MOM, MLS, 700, SAG, NAT, GCC, IQA, PAS, OTH) and must contain only alphanumeric characters. Tax Identification Number "TIN" a... | not( string-length(normalize-space( ./@schemeID)) > 2 and contains('TIN NAT IQA PAS CRN MOM MLS 700 SAG GCC OTH', normalize-space(./@schemeID))) | Buyer ID must use an allowed scheme ID | معرّف المشتري يجب أن يستخدم نوعاً مسموحاً | Applies to each cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID (BT-46): its @schemeID (BT-46-1) must be one of TIN, CRN, MOM, MLS, 700, SAG, NAT, GCC, IQA, PAS, OTH. The executed check verifies only the scheme; the 'alphanumeric only' part appears in the listed test text but is not enforced. | Give the buyer ID a valid scheme, e.g. `<cac:PartyIdentification><cbc:ID schemeID="NAT">1234567890</cbc:ID></cac:PartyIdentification>`, using letters and digits only as the official text requires. | تنطبق على كل cac:AccountingCustomerParty/cac:Party/cac:PartyIdentification/cbc:ID (BT-46): يجب أن تكون قيمة @schemeID (BT-46-1) إحدى القيم TIN, CRN, MOM, MLS, 700, SAG, NAT, GCC, IQA, PAS, OTH. الفحص الفعلي يتحقق من النوع فقط؛ أما شرط 'أحرف وأرقام فقط' فيظهر في نص الاختبار المدرج لكنه غير مطبّق. | أعطِ معرّف المشتري نوعاً صالحاً، مثل `<cac:PartyIdentification><cbc:ID schemeID="NAT">1234567890</cbc:ID></cac:PartyIdentification>`، بأحرف وأرقام فقط كما يشترط النص الرسمي. | conditional | [
"BT-46",
"BT-46-1"
] | https://matheel.app/en/zatca-errors/br-ksa-14 | https://matheel.app/akhta/br-ksa-14 |
BR-KSA-15 | warning | ZATCA KSA rules | [BR-KSA-15]-The tax invoice ((invoice type code (BT-30) = 388) and (invoice transaction code (KSA-2) has "01" as first 2 digits)) must contain the supply date (KSA-5). | not(exists(//cac:Delivery/cbc:ActualDeliveryDate) and normalize-space(//cac:Delivery/cbc:ActualDeliveryDate) != '') | Standard tax invoices (388) need a supply date | الفاتورة الضريبية (388) تحتاج تاريخ التوريد | Applies when cbc:InvoiceTypeCode is 388 and its @name starts with '01': the document must contain a non-empty cac:Delivery/cbc:ActualDeliveryDate (KSA-5). The official text labels the type code BT-30; the type code field is BT-3. | Add the supply date, e.g. `<cac:Delivery><cbc:ActualDeliveryDate>2022-09-07</cbc:ActualDeliveryDate></cac:Delivery>`. | تنطبق عندما تكون قيمة cbc:InvoiceTypeCode هي 388 وتبدأ السمة @name بـ '01': يجب أن يحتوي المستند على cac:Delivery/cbc:ActualDeliveryDate (KSA-5) غير فارغ. النص الرسمي يسمّي رمز النوع BT-30، بينما حقل رمز النوع هو BT-3. | أضف تاريخ التوريد، مثل `<cac:Delivery><cbc:ActualDeliveryDate>2022-09-07</cbc:ActualDeliveryDate></cac:Delivery>`. | standard | [
"BT-30",
"KSA-2",
"KSA-5"
] | https://matheel.app/en/zatca-errors/br-ksa-15 | https://matheel.app/akhta/br-ksa-15 |
BR-KSA-16 | warning | ZATCA KSA rules | [BR-KSA-16]-Payment means code (BT-81) in an invoice exist, then it must contain one of the values from subset of UNTDID 4461 code list | not(( ( not(contains(normalize-space(.),' ')) and contains( ' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 74 75 76 77 78 91 92 93 94 95 96 97 ZZZ ',concat(' ',normali... | Payment means code must be a valid UNTDID 4461 code | رمز وسيلة الدفع يجب أن يكون رمزاً صالحاً من UNTDID 4461 | Applies to each cac:PaymentMeans/cbc:PaymentMeansCode (BT-81) that exists: the executed check accepts 1–68, 70, 74–78, 91–97 or ZZZ. The listed test text instead requires a PaymentMeans and only the codes 10, 30, 42, 48, 1. | Use a single code from the list, e.g. `<cac:PaymentMeans><cbc:PaymentMeansCode>10</cbc:PaymentMeansCode></cac:PaymentMeans>`. | تنطبق على كل cac:PaymentMeans/cbc:PaymentMeansCode (BT-81) موجود: الفحص الفعلي يقبل 1–68 و70 و74–78 و91–97 و ZZZ. أما نص الاختبار المدرج فيشترط وجود PaymentMeans ويقصر الرموز على 10 و30 و42 و48 و1. | استخدم رمزاً واحداً من القائمة، مثل `<cac:PaymentMeans><cbc:PaymentMeansCode>10</cbc:PaymentMeansCode></cac:PaymentMeans>`. | conditional | [
"BT-81"
] | https://matheel.app/en/zatca-errors/br-ksa-16 | https://matheel.app/akhta/br-ksa-16 |
BR-KSA-17 | error | ZATCA KSA rules | [BR-KSA-17]-Debit and credit note (invoice type code (BT-3) is equal to 383 or 381) must contain the reason (KSA-10) for this invoice type issuing. | not(exists(./cbc:InstructionNote)) | Credit and debit notes need a reason for issuing | الإشعارات الدائنة والمدينة تحتاج سبب الإصدار | When cbc:InvoiceTypeCode is 381 or 383, every cac:PaymentMeans must contain cbc:InstructionNote (KSA-10); a note with no cac:PaymentMeans at all also fails. | Add the reason inside cac:PaymentMeans, e.g. `<cac:PaymentMeans><cbc:PaymentMeansCode>10</cbc:PaymentMeansCode><cbc:InstructionNote>Goods returned</cbc:InstructionNote></cac:PaymentMeans>`. | عندما تكون قيمة cbc:InvoiceTypeCode هي 381 أو 383 يجب أن يحتوي كل cac:PaymentMeans على cbc:InstructionNote (KSA-10)؛ ويفشل الإشعار أيضاً إذا لم يحتوِ على أي cac:PaymentMeans. | أضف السبب داخل cac:PaymentMeans، مثل `<cac:PaymentMeans><cbc:PaymentMeansCode>10</cbc:PaymentMeansCode><cbc:InstructionNote>Goods returned</cbc:InstructionNote></cac:PaymentMeans>`. | credit_debit_notes | [
"BT-3",
"KSA-10"
] | https://matheel.app/en/zatca-errors/br-ksa-17 | https://matheel.app/akhta/br-ksa-17 |
BR-KSA-18 | error | ZATCA KSA rules | [BR-KSA-18]-VAT category code must contain one of the values (S, Z, E, O). | not( contains( ' S Z E O ',(.)) ) | VAT category code must be S, Z, E or O | رمز فئة الضريبة يجب أن يكون S أو Z أو E أو O | Each tax category cbc:ID (in cac:TaxSubtotal/cac:TaxCategory, line cac:TaxSubtotal, document-level cac:AllowanceCharge/cac:TaxCategory and line cac:Item/cac:ClassifiedTaxCategory) must be S, Z, E or O. The executed check tests each code; the listed test text is malformed and does not express this. | Use S (standard), Z (zero-rated), E (exempt) or O (not subject to VAT), e.g. `<cbc:ID>S</cbc:ID>`. | يتحقق من أن كل cbc:ID لفئة ضريبية (في cac:TaxSubtotal/cac:TaxCategory، وفي cac:TaxSubtotal للبنود، وفي cac:AllowanceCharge/cac:TaxCategory على مستوى المستند، وفي cac:Item/cac:ClassifiedTaxCategory للبنود) هو S أو Z أو E أو O. الفحص الفعلي يختبر كل رمز، أما نص الاختبار المدرج فمعيب ولا يعبّر عن ذلك. | استخدم S (أساسية) أو Z (نسبة صفرية) أو E (معفاة) أو O (غير خاضعة للضريبة)، مثل `<cbc:ID>S</cbc:ID>`. | all | [] | https://matheel.app/en/zatca-errors/br-ksa-18 | https://matheel.app/akhta/br-ksa-18 |
BR-KSA-19 | warning | ZATCA KSA rules | [BR-KSA-19]-Each Document level charge (BG-21) shall have a code for the reason for document level charge (BT-105). | not (exists(cbc:AllowanceChargeReasonCode) and normalize-space(cbc:AllowanceChargeReasonCode )!='' ) | Each document-level charge needs a reason code | كل رسم على مستوى المستند يحتاج رمز سبب | Applies to each document-level cac:AllowanceCharge with cbc:ChargeIndicator = true: it must have a non-empty cbc:AllowanceChargeReasonCode (BT-105). A text cbc:AllowanceChargeReason alone does not satisfy the executed check; the listed test text expresses this differently. | Add a reason code to each document-level charge, e.g. `<cbc:AllowanceChargeReasonCode>…</cbc:AllowanceChargeReasonCode>`. | تنطبق على كل cac:AllowanceCharge على مستوى المستند فيه cbc:ChargeIndicator = true: يجب أن يحتوي على cbc:AllowanceChargeReasonCode (BT-105) غير فارغ. وجود السبب النصي cbc:AllowanceChargeReason وحده لا يكفي في الفحص الفعلي؛ ونص الاختبار المدرج يعبّر عن ذلك بشكل مختلف. | أضف رمز سبب لكل رسم على مستوى المستند، مثل `<cbc:AllowanceChargeReasonCode>…</cbc:AllowanceChargeReasonCode>`. | conditional | [
"BG-21",
"BT-105"
] | https://matheel.app/en/zatca-errors/br-ksa-19 | https://matheel.app/akhta/br-ksa-19 |
BR-KSA-20 | warning | ZATCA KSA rules | [BR-KSA-20]-Each Invoice line charge (BG-28) shall have a code for the reason for invoice line charge (BT-145). | not(exists(cbc:AllowanceChargeReasonCode) and normalize-space(cbc:AllowanceChargeReasonCode )!='' ) | Each invoice line charge needs a reason code | كل رسم على مستوى البند يحتاج رمز سبب | Applies to each cac:InvoiceLine/cac:AllowanceCharge with cbc:ChargeIndicator = true: it must have a non-empty cbc:AllowanceChargeReasonCode (BT-145). A text cbc:AllowanceChargeReason alone does not satisfy the executed check; the listed test text expresses this differently. | Add a reason code to each line-level charge, e.g. `<cbc:AllowanceChargeReasonCode>…</cbc:AllowanceChargeReasonCode>`. | تنطبق على كل cac:InvoiceLine/cac:AllowanceCharge فيه cbc:ChargeIndicator = true: يجب أن يحتوي على cbc:AllowanceChargeReasonCode (BT-145) غير فارغ. وجود السبب النصي cbc:AllowanceChargeReason وحده لا يكفي في الفحص الفعلي؛ ونص الاختبار المدرج يعبّر عن ذلك بشكل مختلف. | أضف رمز سبب لكل رسم على مستوى البند، مثل `<cbc:AllowanceChargeReasonCode>…</cbc:AllowanceChargeReasonCode>`. | conditional | [
"BG-28",
"BT-145"
] | https://matheel.app/en/zatca-errors/br-ksa-20 | https://matheel.app/akhta/br-ksa-20 |
BR-KSA-21 | warning | ZATCA KSA rules | [BR-KSA-21]-Each Document level charge (BG-21) shall have a Reason for document level charge (BT-104). | not (exists(cbc:AllowanceChargeReason) and normalize-space(cbc:AllowanceChargeReason )!='' ) | Each document-level charge needs a charge reason text (BT-104) | كل رسم على مستوى المستند يحتاج نص سبب الرسم (BT-104) | Applies only when the invoice has a document-level charge (BG-21): every cac:AllowanceCharge directly under the invoice with cbc:ChargeIndicator = true must contain a non-blank cbc:AllowanceChargeReason (BT-104). | Add a reason text to every document-level charge, for example `<cbc:AllowanceChargeReason>Delivery charge</cbc:AllowanceChargeReason>` inside the cac:AllowanceCharge whose cbc:ChargeIndicator is true. | تنطبق فقط عند وجود رسم على مستوى المستند (BG-21): كل عنصر cac:AllowanceCharge مباشرة تحت الفاتورة وقيمة cbc:ChargeIndicator فيه true يجب أن يحتوي على cbc:AllowanceChargeReason (BT-104) غير فارغ. | أضف نص سبب لكل رسم على مستوى المستند، مثل `<cbc:AllowanceChargeReason>Delivery charge</cbc:AllowanceChargeReason>` داخل cac:AllowanceCharge الذي قيمة cbc:ChargeIndicator فيه true. | conditional | [
"BG-21",
"BT-104"
] | https://matheel.app/en/zatca-errors/br-ksa-21 | https://matheel.app/akhta/br-ksa-21 |
BR-KSA-22 | warning | ZATCA KSA rules | [BR-KSA-22]- Each Invoice line charge (BG-28) shall have a Reason for invoice line charge (BT-144). | not( exists(cbc:AllowanceChargeReason)and normalize-space(cbc:AllowanceChargeReason )!='' ) | Each invoice line charge needs a charge reason text (BT-144) | كل رسم على مستوى البند يحتاج نص سبب الرسم (BT-144) | Applies only when a line has a charge (BG-28): every cac:InvoiceLine/cac:AllowanceCharge with cbc:ChargeIndicator = true must contain a non-blank cbc:AllowanceChargeReason (BT-144). | Add a reason text to every line-level charge, for example `<cbc:AllowanceChargeReason>Installation</cbc:AllowanceChargeReason>` inside the line's cac:AllowanceCharge whose cbc:ChargeIndicator is true. | تنطبق فقط عند وجود رسم على أحد البنود (BG-28): كل عنصر cac:InvoiceLine/cac:AllowanceCharge قيمة cbc:ChargeIndicator فيه true يجب أن يحتوي على cbc:AllowanceChargeReason (BT-144) غير فارغ. | أضف نص سبب لكل رسم على مستوى البند، مثل `<cbc:AllowanceChargeReason>Installation</cbc:AllowanceChargeReason>` داخل cac:AllowanceCharge الخاص بالبند والذي قيمة cbc:ChargeIndicator فيه true. | conditional | [
"BG-28",
"BT-144"
] | https://matheel.app/en/zatca-errors/br-ksa-22 | https://matheel.app/akhta/br-ksa-22 |
BR-KSA-23 | warning | ZATCA KSA rules | [BR-KSA-23]-A VAT breakdown (BG-23) with VAT Category code (BT-118) 'Exempt from VAT' shall have a VAT exemption reason code (BT-121). | not(exists(cbc:TaxExemptionReasonCode) and normalize-space(cbc:TaxExemptionReasonCode )!='' ) | VAT-exempt (E) breakdown needs an exemption reason code (BT-121) | تفصيل الضريبة المعفى (E) يحتاج رمز سبب الإعفاء (BT-121) | Applies to each document-level cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory whose cbc:ID is 'E' (exempt): it must contain a non-blank cbc:TaxExemptionReasonCode (BT-121). This rule checks only that a code is present, not which code it is. | Inside every TaxCategory with cbc:ID 'E', add `<cbc:TaxExemptionReasonCode>` with the exemption code that applies; the exempt codes named in the rule's text are VATEX-SA-29, VATEX-SA-29-7 and VATEX-SA-30. | تنطبق على كل عنصر cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory على مستوى المستند قيمة cbc:ID فيه 'E' (معفى): يجب أن يحتوي على cbc:TaxExemptionReasonCode (BT-121) غير فارغ. القاعدة تتحقق من وجود الرمز فقط، لا من قيمته. | داخل كل TaxCategory قيمة cbc:ID فيه 'E' أضف `<cbc:TaxExemptionReasonCode>` برمز الإعفاء المناسب؛ رموز الإعفاء المذكورة في نص القاعدة هي VATEX-SA-29 و VATEX-SA-29-7 و VATEX-SA-30. | conditional | [
"BG-23",
"BT-118",
"BT-121"
] | https://matheel.app/en/zatca-errors/br-ksa-23 | https://matheel.app/akhta/br-ksa-23 |
BR-KSA-24 | warning | ZATCA KSA rules | [BR-KSA-24]-A VAT breakdown (BG-23) with VAT Category code (BT-118) 'Not subject to VAT' shall have a VAT exception reason code (BT-121) | not(exists(cbc:TaxExemptionReasonCode) and normalize-space(cbc:TaxExemptionReasonCode )!='' ) | Not-subject-to-VAT (O) breakdown needs a reason code (BT-121) | تفصيل الضريبة غير الخاضع (O) يحتاج رمز السبب (BT-121) | Applies to each document-level cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory whose cbc:ID is 'O' (not subject to VAT): it must contain a non-blank cbc:TaxExemptionReasonCode (BT-121). This rule checks only that a code is present, not which code it is. | Inside every TaxCategory with cbc:ID 'O', add `<cbc:TaxExemptionReasonCode>` with the out-of-scope reason code (the same rules file uses VATEX-SA-OOS for this category). | تنطبق على كل عنصر cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory على مستوى المستند قيمة cbc:ID فيه 'O' (غير خاضع للضريبة): يجب أن يحتوي على cbc:TaxExemptionReasonCode (BT-121) غير فارغ. القاعدة تتحقق من وجود الرمز فقط، لا من قيمته. | داخل كل TaxCategory قيمة cbc:ID فيه 'O' أضف `<cbc:TaxExemptionReasonCode>` برمز سبب عدم الخضوع (ملف القواعد نفسه يستخدم VATEX-SA-OOS لهذه الفئة). | conditional | [
"BG-23",
"BT-118",
"BT-121"
] | https://matheel.app/en/zatca-errors/br-ksa-24 | https://matheel.app/akhta/br-ksa-24 |
BR-KSA-25 | warning | ZATCA KSA rules | [BR-KSA-25]-If it is a simplified tax invoice or an associated credit note or a debit note (KSA-2, position 1 and 2 = 02) and the tax exemption reason code (BT-121) is equal with VATEX-SA-EDU or VATEX-SA-HEA, then buyer name (BT-44) is mandatory. | not((every $taxreasoncode in //cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:TaxExemptionReasonCode satisfies contains(' VATEX-SA-HEA VATEX-SA-EDU ', $taxreasoncode) and exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName) and (//cac:AccountingCustomerParty/cac:Party/cac:PartyLeg... | Simplified invoice with EDU/HEA exemption needs the buyer name | الفاتورة المبسطة بإعفاء EDU/HEA تتطلب اسم المشتري | For simplified invoices and their notes (cbc:InvoiceTypeCode @name starting '02'): if the invoice has VAT exemption reason codes (BT-121) and every one of them is VATEX-SA-EDU or VATEX-SA-HEA, the buyer name cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName (BT-44) must be present and non-... | Add the buyer's name: `<cac:PartyLegalEntity><cbc:RegistrationName>…</cbc:RegistrationName></cac:PartyLegalEntity>` under cac:AccountingCustomerParty/cac:Party. | للفواتير المبسطة وإشعاراتها (قيمة @name في cbc:InvoiceTypeCode تبدأ بـ '02'): إذا احتوت الفاتورة على رموز سبب إعفاء (BT-121) وكانت كلها VATEX-SA-EDU أو VATEX-SA-HEA، فيجب أن يكون اسم المشتري cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:RegistrationName (BT-44) موجودًا وغير فارغ. إذا ظهر رمز إعفاء آخر ... | أضف اسم المشتري: `<cac:PartyLegalEntity><cbc:RegistrationName>…</cbc:RegistrationName></cac:PartyLegalEntity>` تحت cac:AccountingCustomerParty/cac:Party. | simplified | [
"KSA-2",
"BT-121",
"BT-44"
] | https://matheel.app/en/zatca-errors/br-ksa-25 | https://matheel.app/akhta/br-ksa-25 |
ZATCA e-invoicing validation rules, explained (English + Arabic)
Every business rule ZATCA (Saudi Zakat, Tax and Customs Authority) applies to e-invoices in Phase 2, from the Schematron files in ZATCA E-invoicing SDK 3.4.8: 245 rules (BR-KSA and EN 16931).
Each record has the official message, the severity (error = the invoice is rejected, warning = accepted with a warning), the condition the SDK actually executes (fails_when, which sometimes differs from the published text), and a plain explanation and fix in English and Arabic.
| field | meaning |
|---|---|
id |
rule code, e.g. BR-KSA-33 |
severity |
error or warning |
official_text |
ZATCA's message |
fails_when |
the XPath condition that triggers the rule in the SDK |
en_title, en_meaning, en_fix |
English explanation |
ar_title, ar_meaning, ar_fix |
Arabic explanation |
applies_to |
all, standard, simplified, credit_debit_notes or conditional |
fields |
field IDs (BT-x, KSA-x) |
url_en, url_ar |
the rule's page |
Tested cases where the executed check differs from the text: https://matheel.app/en/zatca-sdk-findings Validate an invoice against these rules in your browser: https://matheel.app/en/zatca-validator Source repository: https://github.com/nagieeb0/zatca-rules
Explanations: CC BY 4.0. Official texts and conditions are ZATCA's. Not affiliated with ZATCA.
- Downloads last month
- 39