# EN 16931 rules as ZATCA ships them (UBL) SDK 3.4.6

Source: https://xmlvalid.com/rules/sets/sa-zatca-en16931

> 103 rules by ZATCA (Zakat, Tax and Customs Authority), from the CEN/TC 434 rules (GNU LGPL 3.0). Source: https://zatca.gov.sa/en/E-Invoicing/SystemsDevelopers/ComplianceEnablementToolbox/Pages/DownloadSDK.aspx

- [BR-02](https://xmlvalid.com/rules/BR-02.md) (warning): An Invoice shall have an Invoice number (BT-1).
- [BR-03](https://xmlvalid.com/rules/BR-03.md) (error): An Invoice shall have an Invoice issue date (BT-2).
- [BR-04](https://xmlvalid.com/rules/BR-04.md) (error): An Invoice shall have an Invoice type code (BT-3).
- [BR-05](https://xmlvalid.com/rules/BR-05.md) (error): An Invoice shall have an Invoice currency code (BT-5).
- [BR-06](https://xmlvalid.com/rules/BR-06.md) (warning): An Invoice shall contain the Seller name (BT-27).
- [BR-08](https://xmlvalid.com/rules/BR-08.md) (warning): An Invoice shall contain the Seller postal address (BG-5)
- [BR-09](https://xmlvalid.com/rules/BR-09.md) (warning): The Seller postal address (BG-5) shall contain a Seller country code (BT-40).
- [BR-13](https://xmlvalid.com/rules/BR-13.md) (warning): An Invoice shall have the Invoice total amount without VAT (BT-109).
- [BR-14](https://xmlvalid.com/rules/BR-14.md) (error): An Invoice shall have the Invoice total amount with VAT (BT-112).
- [BR-15](https://xmlvalid.com/rules/BR-15.md) (error): An Invoice shall have the Amount due for payment (BT-115).
- [BR-16](https://xmlvalid.com/rules/BR-16.md) (error): An Invoice shall have at least one Invoice line (BG-25)
- [BR-21](https://xmlvalid.com/rules/BR-21.md) (warning): Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126).
- [BR-22](https://xmlvalid.com/rules/BR-22.md) (error): Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).
- [BR-24](https://xmlvalid.com/rules/BR-24.md) (error): Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131).
- [BR-25](https://xmlvalid.com/rules/BR-25.md) (warning): Each Invoice line (BG-25) shall contain the Item name (BT-153).
- [BR-26](https://xmlvalid.com/rules/BR-26.md) (error): Each Invoice line (BG-25) shall contain the Item net price (BT-146).
- [BR-31](https://xmlvalid.com/rules/BR-31.md) (error): Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92).
- [BR-32](https://xmlvalid.com/rules/BR-32.md) (error): Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95).
- [BR-36](https://xmlvalid.com/rules/BR-36.md) (warning): Each Document level charge (BG-21) shall have a Document level charge amount (BT-99).
- [BR-37](https://xmlvalid.com/rules/BR-37.md) (warning): Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102).
- [BR-41](https://xmlvalid.com/rules/BR-41.md) (error): Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136).
- [BR-43](https://xmlvalid.com/rules/BR-43.md) (warning): Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141).
- [BR-45](https://xmlvalid.com/rules/BR-45.md) (error): Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116).
- [BR-46](https://xmlvalid.com/rules/BR-46.md) (error): Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117).
- [BR-47](https://xmlvalid.com/rules/BR-47.md) (error): Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118).
- [BR-48](https://xmlvalid.com/rules/BR-48.md) (error): Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT.
- [BR-49](https://xmlvalid.com/rules/BR-49.md) (warning): A Payment instruction (BG-16) shall specify the Payment means type code (BT-81).
- [BR-52](https://xmlvalid.com/rules/BR-52.md) (warning): Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122).
- [BR-53](https://xmlvalid.com/rules/BR-53.md) (warning): If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided.
- [BR-54](https://xmlvalid.com/rules/BR-54.md) (error): Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161).
- [BR-55](https://xmlvalid.com/rules/BR-55.md) (error): Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).
- [BR-CL-01](https://xmlvalid.com/rules/BR-CL-01.md) (error): The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001.
- [BR-CL-03](https://xmlvalid.com/rules/BR-CL-03.md) (error): currencyID MUST be coded using ISO code list 4217 alpha-3
- [BR-CL-04](https://xmlvalid.com/rules/BR-CL-04.md) (error): Invoice currency code MUST be coded using ISO code list 4217 alpha-3
- [BR-CL-05](https://xmlvalid.com/rules/BR-CL-05.md) (error): Tax currency code MUST be coded using ISO code list 4217 alpha-3
- [BR-CL-14](https://xmlvalid.com/rules/BR-CL-14.md) (warning): Country codes in an invoice MUST be coded using ISO code list 3166-1
- [BR-CL-16](https://xmlvalid.com/rules/BR-CL-16.md) (warning): Payment means in an invoice MUST be coded using UNCL4461 code list
- [BR-CL-18](https://xmlvalid.com/rules/BR-CL-18.md) (error): Invoice tax categories MUST be coded using UNCL5305 code list.
- [BR-CO-04](https://xmlvalid.com/rules/BR-CO-04.md) (error): Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).
- [BR-CO-10](https://xmlvalid.com/rules/BR-CO-10.md) (warning): Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131).
- [BR-CO-11](https://xmlvalid.com/rules/BR-CO-11.md) (error): Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92).
- [BR-CO-12](https://xmlvalid.com/rules/BR-CO-12.md) (error): Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99).
- [BR-CO-13](https://xmlvalid.com/rules/BR-CO-13.md) (warning): 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).
- [BR-CO-14](https://xmlvalid.com/rules/BR-CO-14.md) (error): Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117).
- [BR-CO-15](https://xmlvalid.com/rules/BR-CO-15.md) (error): Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).
- [BR-CO-16](https://xmlvalid.com/rules/BR-CO-16.md) (warning): Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114).
- [BR-CO-17](https://xmlvalid.com/rules/BR-CO-17.md) (warning): VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.
- [BR-CO-18](https://xmlvalid.com/rules/BR-CO-18.md) (error): An Invoice shall at least have one VAT breakdown group (BG-23).
- [BR-DEC-01](https://xmlvalid.com/rules/BR-DEC-01.md) (warning): The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2.
- [BR-DEC-02](https://xmlvalid.com/rules/BR-DEC-02.md) (warning): The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2.
- [BR-DEC-05](https://xmlvalid.com/rules/BR-DEC-05.md) (warning): The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2.
- [BR-DEC-06](https://xmlvalid.com/rules/BR-DEC-06.md) (warning): The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2.
- [BR-DEC-09](https://xmlvalid.com/rules/BR-DEC-09.md) (warning): The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2.
- [BR-DEC-10](https://xmlvalid.com/rules/BR-DEC-10.md) (warning): The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2.
- [BR-DEC-11](https://xmlvalid.com/rules/BR-DEC-11.md) (warning): The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2.
- [BR-DEC-12](https://xmlvalid.com/rules/BR-DEC-12.md) (warning): The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2.
- [BR-DEC-13](https://xmlvalid.com/rules/BR-DEC-13.md) (warning): The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2.
- [BR-DEC-14](https://xmlvalid.com/rules/BR-DEC-14.md) (warning): The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2.
- [BR-DEC-15](https://xmlvalid.com/rules/BR-DEC-15.md) (warning): The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2.
- [BR-DEC-16](https://xmlvalid.com/rules/BR-DEC-16.md) (warning): The allowed maximum number of decimals for the Pre-Paid amount (BT-113) is 2.
- [BR-DEC-17](https://xmlvalid.com/rules/BR-DEC-17.md) (warning): The allowed maximum number of decimals for the Rounding amount (BT-114) is 2.
- [BR-DEC-18](https://xmlvalid.com/rules/BR-DEC-18.md) (warning): The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.
- [BR-DEC-19](https://xmlvalid.com/rules/BR-DEC-19.md) (warning): The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2.
- [BR-DEC-20](https://xmlvalid.com/rules/BR-DEC-20.md) (warning): The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2.
- [BR-DEC-23](https://xmlvalid.com/rules/BR-DEC-23.md) (warning): The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.
- [BR-DEC-24](https://xmlvalid.com/rules/BR-DEC-24.md) (warning): The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2.
- [BR-DEC-25](https://xmlvalid.com/rules/BR-DEC-25.md) (warning): The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2.
- [BR-DEC-27](https://xmlvalid.com/rules/BR-DEC-27.md) (warning): The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2.
- [BR-DEC-28](https://xmlvalid.com/rules/BR-DEC-28.md) (warning): The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2.
- [BR-E-01](https://xmlvalid.com/rules/BR-E-01.md) (warning): 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".
- [BR-E-05](https://xmlvalid.com/rules/BR-E-05.md) (error): 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).
- [BR-E-06](https://xmlvalid.com/rules/BR-E-06.md) (error): 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).
- [BR-E-07](https://xmlvalid.com/rules/BR-E-07.md) (error): 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).
- [BR-E-08](https://xmlvalid.com/rules/BR-E-08.md) (warning): 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 category codes (BT-151, BT-95, BT-102) are "Exempt from VAT".
- [BR-E-09](https://xmlvalid.com/rules/BR-E-09.md) (error): 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).
- [BR-KSA-F-06-C1](https://xmlvalid.com/rules/BR-KSA-F-06-C1.md) (warning): Field character limits for Invoice number field (BT-1) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters.
- [BR-KSA-F-06-C2](https://xmlvalid.com/rules/BR-KSA-F-06-C2.md) (warning): Field character limits for Invoice note field (BT-22) have not been met. The maximum limit is 1000 characters.
- [BR-KSA-F-06-C8](https://xmlvalid.com/rules/BR-KSA-F-06-C8.md) (warning): Field character limits for the Seller Address - Province/State field (BT-39) have not been met. The maximum limit is 127 characters.
- [BR-KSA-F-06-C10](https://xmlvalid.com/rules/BR-KSA-F-06-C10.md) (warning): Field character limits for Seller name field (BT-27) have not been met. The minimum limit is 1 character and the maximum limit is 1000 characters.
- [BR-KSA-F-06-C17](https://xmlvalid.com/rules/BR-KSA-F-06-C17.md) (error): Field character limits for Invoice line identifier field (BT-126) have not been met. The minimum limit is 1 character and the maximum limit is 6 characters.
- [BR-KSA-F-06-C18](https://xmlvalid.com/rules/BR-KSA-F-06-C18.md) (warning): Field character limits for Invoiced quantity unit of measure field (BT-130) have not been met. The maximum limit is 127 characters.
- [BR-KSA-F-06-C19](https://xmlvalid.com/rules/BR-KSA-F-06-C19.md) (warning): Field character limits for Item name field (BT-153) have not been met. The minimum limit is 3 character and the maximum limit is 1000 characters.
- [BR-KSA-F-06-C20](https://xmlvalid.com/rules/BR-KSA-F-06-C20.md) (warning): Field character limits for Item standard identifier field (BT-157) have not been met. The maximum limit is 127 characters.
- [BR-KSA-F-06-C27](https://xmlvalid.com/rules/BR-KSA-F-06-C27.md) (warning): Field character limits for the Buyer Address - Province/State field (BT-54) have not been met. The maximum limit is 127 characters.
- [BR-KSA-F-06-C30](https://xmlvalid.com/rules/BR-KSA-F-06-C30.md) (warning): Field character limits for Item Buyer's identifier field (BT-156) have not been met. The maximum limit is 127 characters.
- [BR-KSA-F-06-C31](https://xmlvalid.com/rules/BR-KSA-F-06-C31.md) (warning): Field character limits for Item Seller's identifier field (BT-155) have not been met. The maximum limit is 127 characters.
- [BR-KSA-F-C-01](https://xmlvalid.com/rules/BR-KSA-F-C-01.md) (warning): Please recheck Item Description (BT-153). Providing unclear description violates the requirements specified in Article 53 of VAT Regulations.
- [BR-O-01](https://xmlvalid.com/rules/BR-O-01.md) (warning): 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 "Not subject to VAT" shall contain exactly at least one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT".
- [BR-O-08](https://xmlvalid.com/rules/BR-O-08.md) (warning): In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Not subject to 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 category codes (BT-151, BT-95, BT-102) are "Not subject to VAT".
- [BR-O-09](https://xmlvalid.com/rules/BR-O-09.md) (error): The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Not subject to VAT" shall be 0 (zero).
- [BR-S-01](https://xmlvalid.com/rules/BR-S-01.md) (warning): 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, BT-95 or BT-102) is "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated".
- [BR-S-05](https://xmlvalid.com/rules/BR-S-05.md) (warning): For invoice items (BG-25) in which the VAT category code of invoiced items (BT-151) is "Standard rated" the VAT rate of the invoiced item (BT-152) must be greater than zero.
- [BR-S-06](https://xmlvalid.com/rules/BR-S-06.md) (error): In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" the Document level allowance VAT rate (BT-96) shall be greater than zero.
- [BR-S-07](https://xmlvalid.com/rules/BR-S-07.md) (warning): -In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" the Document level charge VAT rate (BT-103) shall be greater than zero.
- [BR-S-08](https://xmlvalid.com/rules/BR-S-08.md) (warning): In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Standard rated" 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 category codes (BT-151, BT-95, BT-102) are "Standard Rate".
- [BR-S-09](https://xmlvalid.com/rules/BR-S-09.md) (warning): The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119) / 100), rounded to two decimals.
- [BR-S-10](https://xmlvalid.com/rules/BR-S-10.md) (warning): A VAT breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).
- [BR-Z-01](https://xmlvalid.com/rules/BR-Z-01.md) (warning): 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 "Zero rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Zero rated".
- [BR-Z-05](https://xmlvalid.com/rules/BR-Z-05.md) (error): In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Zero rated" the Invoiced item VAT rate (BT-152) shall be 0 (zero).
- [BR-Z-06](https://xmlvalid.com/rules/BR-Z-06.md) (error): In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" the Document level allowance VAT rate (BT-96) shall be 0 (zero).
- [BR-Z-07](https://xmlvalid.com/rules/BR-Z-07.md) (error): In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Zero rated" the Document level charge VAT rate (BT-103) shall be 0 (zero).
- [BR-Z-08](https://xmlvalid.com/rules/BR-Z-08.md) (warning): In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Zero rated" 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 category codes (BT-151, BT-95, BT-102) are "Zero Rated".
- [BR-Z-09](https://xmlvalid.com/rules/BR-Z-09.md) (error): The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero).
