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 must occur exactly once in ram:ApplicableTradeTax. The element is missing or occurs more than once.

What the rule means

ram:CalculatedAmount contains the calculated tax amount for the relevant VAT breakdown. Exactly one occurrence is required so that this amount can be identified unambiguously.

Please provide the calculated tax amount exactly once

The calculated tax amount is missing from the invoice’s VAT section or appears more than once. You can resolve this by having exactly one occurrence there.

What to do
  1. Locate the relevant ram:ApplicableTradeTax.
  2. Check that ram:CalculatedAmount occurs exactly once within it.
  3. Generate the invoice again and validate it once more.
Technical details

The XPath test uses count(ram:CalculatedAmount)=1 to require exactly one direct child element named ram:CalculatedAmount.

Where the rule applies

The rule applies to each ram:ApplicableTradeTax 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