Partial payment amount may be specified only once

Error FX-SCH-A-000330 Factur-X

Element 'ram:PartialPaymentAmount' 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

The ram:PartialPaymentAmount element occurs more than once within the same ram:SpecifiedTradePaymentTerms.

What the rule means

The rule limits the number of partial payment amount entries in the payment terms to no more than one.

Please enter the partial payment amount only once

The payment terms contain ram:PartialPaymentAmount more than once. The entry can be limited to a single occurrence.

What to do
  1. Find all occurrences of ram:PartialPaymentAmount in ram:SpecifiedTradePaymentTerms.
  2. Remove the extra occurrences so that no more than one remains.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradePaymentTerms>
  <ram:PartialPaymentAmount>50.00</ram:PartialPaymentAmount>
  <ram:PartialPaymentAmount>50.00</ram:PartialPaymentAmount>
</ram:SpecifiedTradePaymentTerms>
✓ Correct
<ram:SpecifiedTradePaymentTerms>
  <ram:PartialPaymentAmount>50.00</ram:PartialPaymentAmount>
</ram:SpecifiedTradePaymentTerms>
Technical details

The XPath counts direct ram:PartialPaymentAmount elements within ram:SpecifiedTradePaymentTerms and requires the count to be at most one.

Where the rule applies

The rule applies to the ram:PartialPaymentAmount element within ram:SpecifiedTradePaymentTerms.

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