BR-KSA-51
The line amount with VAT (KSA-12) must be Invoice line net amount (BT-131) + Line VAT amount (KSA-11).
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
cac:InvoiceLine/cac:TaxTotal
(cbc:RoundingAmount) = (../cbc:LineExtensionAmount) + (cbc:TaxAmount)
Checked with Saudi Arabia ZATCA Tax Invoice (UBL), Saudi Arabia ZATCA Simplified Tax Invoice (UBL)