Include ram:LineTotalBasisAmount no more than once

Error FX-SCH-A-000323 Factur-X

Element 'ram:LineTotalBasisAmount' 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:LineTotalBasisAmount occurs more than once within the same ram:ApplicableTradeTax.

What the rule means

ram:LineTotalBasisAmount provides an amount as a basis for the VAT breakdown. The rule allows no more than one such element per ram:ApplicableTradeTax.

Please include `ram:LineTotalBasisAmount` no more than once

ram:LineTotalBasisAmount appears more than once in an ram:ApplicableTradeTax. You can resolve this by having this element occur no more than once there.

What to do
  1. Locate the affected ram:ApplicableTradeTax.
  2. Ensure that ram:LineTotalBasisAmount occurs no more than once within it.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:LineTotalBasisAmount>1</ram:LineTotalBasisAmount>
  <ram:LineTotalBasisAmount>2</ram:LineTotalBasisAmount>
</ram:ApplicableTradeTax>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:LineTotalBasisAmount>1</ram:LineTotalBasisAmount>
</ram:ApplicableTradeTax>
Technical details

The XPath test counts the direct ram:LineTotalBasisAmount elements and passes when their count is at most one.

Where the rule applies

The rule applies within ram:ApplicableTradeTax at document level.

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