# BR-KSA-31

Source: https://xmlvalid.com/rules/BR-KSA-31

> For Simplified Tax Invoices and associated credit notes and debit notes (KSA-2, position 1 and 2 = 02), transaction types "self-billing" (KSA-2, position 7 = True) is not allowed.

- Level: error
- Rule sets: ZATCA e-invoicing rules (Saudi Arabia) SDK 3.4.6
- Context: `cbc:InvoiceTypeCode[substring(@name, 1, 2) = '02']`
- Test: `(substring(./@name, 3,1) = '1' or substring(./@name, 3,1) = '0') and (substring(./@name, 4,1) = '1' or substring(./@name, 4,1) = '0') and (substring(./@name, 5,1) = '0') and (substring(./@name, 6,1) = '1' or substring(./@name, 6,1) = '0') and (substring(./@name, 7,1) = '0')`

Validate a document against these rules: https://xmlvalid.com/validate
