# CRP20217

Source: https://xmlvalid.com/rules/CRP20217

> La suma de los valores registrados en el campo ImpPagado de los apartados DoctoRelacionado no es menor o igual que el valor del campo Monto (…, Monto …).

- Level: error
- Rule sets: SAT validations of CFDI 4.0 and Pagos 2.0 Matrices of 25 March 2026 and Pagos 2.0 rev. B
- Context: `pago20:Pagos/pago20:Pago`
- Test: `not($same) or sum(for $x in $docs return mx:dec($x/@ImpPagado)) le mx:dec(@Monto)`

In English: When the related documents are in the payment's currency, the sum of their ImpPagado must not be more than the payment's Monto.

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