Message

Expected total sum of charges at document level MUST be equal to the sum of charges at document level, if expected total sum of charges at document level is provided

Context
//cac:AnticipatedMonetaryTotal
Test
(cbc:ChargeTotalAmount and (xs:decimal(cbc:ChargeTotalAmount)) = (round(xs:decimal(sum(/ubl:Order/cac:AllowanceCharge[cbc:ChargeIndicator="true"]/cbc:Amount)) * 10 * 10) div 100)) or not(cbc:ChargeTotalAmount)
Usage
/ ubl:Order / cac:AnticipatedMonetaryTotal / cbc:ChargeTotalAmount