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:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator="false"]/cbc:Amount)) * 10 * 10) div 100) or not(cbc:AllowanceTotalAmount)
Usage
/ ubl:Invoice / cac:LegalMonetaryTotal / cbc:AllowanceTotalAmount