Exactly one LineTotalAmount per invoice line

Error FX-SCH-A-000549 Factur-X

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

Within the invoice line’s SpecifiedTradeSettlementLineMonetarySummation, ram:LineTotalAmount does not occur exactly once. The element is either missing or appears more than once.

What the rule means

ram:LineTotalAmount specifies the total amount of the invoice line. A single unambiguous value is needed for this amount to be processed correctly.

Please include the invoice line total exactly once

The total for an invoice line is missing or entered more than once. A single value makes this part of the invoice unambiguous.

What to do
  1. Open SpecifiedTradeSettlementLineMonetarySummation for the affected invoice line.
  2. Check that ram:LineTotalAmount occurs there exactly once.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementLineMonetarySummation/>
✓ Correct
<ram:SpecifiedTradeSettlementLineMonetarySummation>
  <ram:LineTotalAmount>100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
Technical details

The XPath test requires exactly one direct ram:LineTotalAmount child element.

Where the rule applies

The rule applies to SpecifiedTradeSettlementLineMonetarySummation within an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation
Test expression (assert/@test)
count(ram:LineTotalAmount)=1