Message

The sum of allowances at document level MUST be equal to the sum of document level allowance amounts

Context
//cac:LegalMonetaryTotal
Test
(xs:decimal(cbc:AllowanceTotalAmount)) = (round(xs:decimal(sum(/ubl:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator="false"]/cbc:Amount)) * 10 * 10) div 100) or not(cbc:AllowanceTotalAmount)
Usage
/ ubl:CreditNote / cac:LegalMonetaryTotal / cbc:AllowanceTotalAmount