# XV-SA-11

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

> The total with VAT in the QR code (tag 4, …) is neither the invoice's TaxInclusiveAmount (…) nor, after prepayments, its PayableAmount (…).

- 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[5] = '' or empty($total) or sa:dec($fields[5]) = ($total, $payable)`

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