Element 'ram:ChargeIndicator' must occur exactly 1 times.
In this ram:SpecifiedTradeAllowanceCharge, the ram:ChargeIndicator element does not occur exactly once. The test counts its occurrences and fails if the count is not one.
ram:ChargeIndicator identifies whether the amount represents a charge or an allowance. Here, false indicates an allowance, for which exactly one indicator must be present.
The allowance on the invoice line does not contain exactly one ram:ChargeIndicator. A single occurrence identifies the allowance unambiguously.
- Locate the relevant
ram:SpecifiedTradeAllowanceChargeon the invoice line. - Ensure it contains exactly one
ram:ChargeIndicatorwithudt:Indicatorset tofalse. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
Technical details
The test requires count(ram:ChargeIndicator) to equal 1 in the selected ram:SpecifiedTradeAllowanceCharge.
The rule applies to ram:SpecifiedTradeAllowanceCharge at invoice line level when its ram:ChargeIndicator has the value false.
rule/@context)assert/@test)