# XV-SA-12

Source: https://xmlvalid.com/rules/XV-SA-12

> The VAT total in the QR code (tag 5, …) is not the invoice's VAT total (…).

- Level: error
- Rule sets: ZATCA cryptographic stamp and QR code checks Security Features Implementation Standards 1.1, SDK 3.4.6
- Context: `/*/cac:AdditionalDocumentReference[cbc:ID = 'QR']`
- Test: `not($readable) or $fields[6] = '' or empty($taxes) or sa:dec($fields[6]) = $taxes`

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