Invoice line tax entry

Error FX-SCH-A-000278 Factur-X

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

ram:ApplicableTradeTax does not occur exactly once in ram:SpecifiedLineTradeSettlement. The element is missing or occurs more than once.

What the rule means

The tax entry must be assigned unambiguously to the invoice line. Exactly one element ensures that the tax entry for this line is neither missing nor duplicated.

Please include the invoice line tax entry exactly once

ram:ApplicableTradeTax is missing or appears more than once for this invoice line. You can correct this in the invoice line settlement.

What to do
  1. Make sure ram:SpecifiedLineTradeSettlement contains exactly one ram:ApplicableTradeTax.
  2. Generate the invoice again and check it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedLineTradeSettlement/>
✓ Correct
<ram:SpecifiedLineTradeSettlement>
  <ram:ApplicableTradeTax/>
</ram:SpecifiedLineTradeSettlement>
Technical details

The check counts the direct ram:ApplicableTradeTax elements in the ram:SpecifiedLineTradeSettlement context and requires a count of 1.

Where the rule applies

In the ram:SpecifiedLineTradeSettlement of an invoice line.

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