At most one payment terms element

Error FX-SCH-A-000174 Factur-X

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

What the rule means

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

Please include the payment terms no more than once

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

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

The rule counts the direct ram:SpecifiedTradePaymentTerms 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:SpecifiedTradePaymentTerms)<=1