Provide the calculated tax amount exactly once

Error FX-SCH-A-000176 Factur-X

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

What the rule means

ram:CalculatedAmount contains the calculated tax amount for the corresponding VAT breakdown entry.

Please provide the calculated tax amount exactly once

The VAT breakdown entry does not contain ram:CalculatedAmount exactly once. 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:CalculatedAmount 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:CalculatedAmount>0</ram:CalculatedAmount>
</ram:ApplicableTradeTax>
Technical details

The test counts the direct ram:CalculatedAmount 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:CalculatedAmount)=1