Provide the tax basis amount exactly once

Error FX-SCH-A-000177 Factur-X

Element 'ram:BasisAmount' 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:BasisAmount is missing from ram:ApplicableTradeTax or occurs more than once. It must occur exactly once.

What the rule means

ram:BasisAmount contains the amount used as the basis for the corresponding VAT breakdown entry.

Please provide the tax basis amount exactly once

ram:BasisAmount does not occur exactly once in the VAT breakdown entry. You can resolve this by including the element once in the entry.

What to do
  1. Find the relevant ram:ApplicableTradeTax.
  2. Check that ram:BasisAmount occurs exactly once in it.
  3. Regenerate the invoice and check it again.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax/>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:BasisAmount>0</ram:BasisAmount>
</ram:ApplicableTradeTax>
Technical details

The test counts the direct ram:BasisAmount elements within ram:ApplicableTradeTax and requires a count of 1.

Where the rule applies

The rule applies to each ram:ApplicableTradeTax element in the document-level VAT breakdown.

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