# PEPPOL-T114-R022

Source: https://xmlvalid.com/rules/PEPPOL-T114-R022

> Allowance/charge amount MUST equal base amount * percentage/100 if base amount and percentage exists

- Level: error
- Rule sets: Peppol Order Change rules 3.2
- Context: `/ubl:OrderChange/cac:AllowanceCharge |/ubl:OrderChange/cac:OrderLine/cac:LineItem/cac:AllowanceCharge`
- Test: `not(cbc:MultiplierFactorNumeric and cbc:BaseAmount) or u:slack(if (cbc:Amount) then cbc:Amount else 0, (xs:decimal(cbc:BaseAmount) * xs:decimal(cbc:MultiplierFactorNumeric)) div 100, 0.02)`

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