Exactly one invoice currency

Error FX-SCH-A-000038 Factur-X

Element 'ram:InvoiceCurrencyCode' must occur exactly 1 times.

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

In ram:ApplicableHeaderTradeSettlement, ram:InvoiceCurrencyCode does not occur exactly once. The element is missing or occurs more than once.

What the rule means

The invoice currency identifies the currency of the invoice amounts. Exactly one currency element makes this information unambiguous at document level.

Please provide exactly one invoice currency

ram:InvoiceCurrencyCode is missing from the invoice settlement information, or the element occurs more than once. You can correct the count so that exactly one element is present.

What to do
  1. Locate ram:ApplicableHeaderTradeSettlement.
  2. Make sure the section contains exactly one ram:InvoiceCurrencyCode element.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ApplicableHeaderTradeSettlement/>
✓ Correct
<ram:ApplicableHeaderTradeSettlement>
  <ram:InvoiceCurrencyCode/>
</ram:ApplicableHeaderTradeSettlement>
Technical details

The XPath condition counts the direct ram:InvoiceCurrencyCode child elements and requires exactly one.

Where the rule applies

The rule applies to the document-level settlement information in ram:ApplicableHeaderTradeSettlement.

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