At most one rounding amount

Error FX-SCH-A-000290 Factur-X

Element 'ram:RoundingAmount' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:RoundingAmount occurs more than once in ram:SpecifiedTradeSettlementHeaderMonetarySummation.

What the rule means

The rounding amount represents a rounding adjustment to the invoice total. Multiple values at this location would apply more than one rounding amount to the monetary total.

Please include only one rounding amount

ram:RoundingAmount is included more than once in the invoice header. You can resolve this by having only one rounding amount there.

What to do
  1. Find ram:SpecifiedTradeSettlementHeaderMonetarySummation in the invoice header.
  2. Check the ram:RoundingAmount elements it contains and remove any extra occurrences.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:RoundingAmount>0.01</ram:RoundingAmount>
  <ram:RoundingAmount>0.02</ram:RoundingAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:RoundingAmount>0.01</ram:RoundingAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Technical details

The test counts the direct ram:RoundingAmount elements in the current ram:SpecifiedTradeSettlementHeaderMonetarySummation and allows no more than one occurrence.

Where the rule applies

The rule applies to ram:SpecifiedTradeSettlementHeaderMonetarySummation in the invoice header’s monetary totals.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeSettlementHeaderMonetarySummation
Test expression (assert/@test)
count(ram:RoundingAmount)<=1