ram:RoundingAmount may occur at most once

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. The element may be absent or occur once.

What the rule means

ram:RoundingAmount states a rounding amount in the monetary settlement totals. Allowing at most one value prevents the amount from being stated more than once.

Please provide the rounding amount no more than once

The rounding amount is entered more than once in the monetary settlement totals. You can resolve this by providing no more than one ram:RoundingAmount.

What to do
  1. Find ram:SpecifiedTradeSettlementHeaderMonetarySummation in the invoice.
  2. Check how many times ram:RoundingAmount occurs in it.
  3. Make sure the element occurs no more than once.
  4. Regenerate the invoice and validate it again.
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 rule counts the ram:RoundingAmount elements directly under ram:SpecifiedTradeSettlementHeaderMonetarySummation and permits zero or one.

Where the rule applies

The rule applies to ram:RoundingAmount within the monetary settlement totals in ram:SpecifiedTradeSettlementHeaderMonetarySummation.

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