Element 'ram:ChargeIndicator' must occur exactly 1 times.
In this ram:SpecifiedTradeAllowanceCharge, ram:ChargeIndicator does not occur exactly once. The test counts the occurrences and requires exactly one.
ram:ChargeIndicator identifies whether the amount represents an allowance or a charge. Here, true indicates a charge, for which exactly one indicator must be present.
The charge on the invoice line does not contain exactly one ram:ChargeIndicator. A single occurrence identifies the charge unambiguously.
- Locate the relevant
ram:SpecifiedTradeAllowanceChargeon the invoice line. - Ensure it contains exactly one
ram:ChargeIndicatorwithudt:Indicatorset totrue. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> <ram:ChargeIndicator> <udt:Indicator>true</udt:Indicator> </ram:ChargeIndicator> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>true</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 true.
rule/@context)assert/@test)