Message

Declared for statistics value amount on shipment level SHALL be equal of the sum of the declared for statistic amount for the goods item specified

Context
cac:Shipment
Test
not(cbc:DeclaredStatisticsValueAmount) or not(//cac:GoodsItem/cbc:DeclaredStatisticsValueAmount) or number(cbc:DeclaredStatisticsValueAmount) = sum(//cac:GoodsItem/cbc:DeclaredStatisticsValueAmount)
Usage
/ ubl:DespatchAdvice / cac:Shipment / cbc:DeclaredStatisticsValueAmount
/ ubl:DespatchAdvice / cac:Shipment / cac:TransportHandlingUnit / cac:GoodsItem / cbc:DeclaredStatisticsValueAmount
/ ubl:DespatchAdvice / cac:Shipment / cac:TransportHandlingUnit / cac:Package / cac:ContainedPackage / cac:ContainedPackage / cac:GoodsItem / cbc:DeclaredStatisticsValueAmount
/ ubl:DespatchAdvice / cac:Shipment / cac:TransportHandlingUnit / cac:Package / cac:ContainedPackage / cac:GoodsItem / cbc:DeclaredStatisticsValueAmount
/ ubl:DespatchAdvice / cac:Shipment / cac:TransportHandlingUnit / cac:Package / cac:GoodsItem / cbc:DeclaredStatisticsValueAmount