At most one payment reference element

Error FX-SCH-A-000172 Factur-X

Element 'ram:PaymentReference' 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:PaymentReference occurs more than once in ram:ApplicableHeaderTradeSettlement. The element may appear no more than once.

What the rule means

ram:PaymentReference contains the invoice payment reference. The rule limits this information in the settlement section to one element.

Please provide the payment reference no more than once

The settlement section contains ram:PaymentReference more than once. You can remove the extra elements or omit the payment reference.

What to do
  1. Check the ram:PaymentReference elements in ram:ApplicableHeaderTradeSettlement.
  2. Remove any extra elements or omit the payment reference.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:ApplicableHeaderTradeSettlement>
  <ram:PaymentReference>REF-1</ram:PaymentReference>
  <ram:PaymentReference>REF-2</ram:PaymentReference>
</ram:ApplicableHeaderTradeSettlement>
✓ Correct
<ram:ApplicableHeaderTradeSettlement>
  <ram:PaymentReference>REF-1</ram:PaymentReference>
</ram:ApplicableHeaderTradeSettlement>
Technical details

The rule counts the direct ram:PaymentReference elements under ram:ApplicableHeaderTradeSettlement and allows no more than one.

Where the rule applies

The rule applies within the invoice settlement section, ram:ApplicableHeaderTradeSettlement.

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