ram:TotalPrepaidAmount may occur at most once

Error FX-SCH-A-000193 Factur-X

Element 'ram:TotalPrepaidAmount' 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:TotalPrepaidAmount occurs more than once in ram:SpecifiedTradeSettlementHeaderMonetarySummation. The element may be absent or occur once.

What the rule means

ram:TotalPrepaidAmount states the total amount already paid. Allowing at most one element ensures that this amount is not stated more than once.

Please provide the total amount already paid no more than once

The total amount already paid is entered more than once in the monetary settlement totals. You can resolve this by providing no more than one ram:TotalPrepaidAmount.

What to do
  1. Find ram:SpecifiedTradeSettlementHeaderMonetarySummation in the invoice.
  2. Check how many times ram:TotalPrepaidAmount 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:TotalPrepaidAmount>20.00</ram:TotalPrepaidAmount>
  <ram:TotalPrepaidAmount>20.00</ram:TotalPrepaidAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
✓ Correct
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:TotalPrepaidAmount>20.00</ram:TotalPrepaidAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Technical details

The rule counts the ram:TotalPrepaidAmount elements directly under ram:SpecifiedTradeSettlementHeaderMonetarySummation and permits zero or one.

Where the rule applies

The rule applies to the total amount already prepaid 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:TotalPrepaidAmount)<=1