Exactly one calculated tax amount for the advance payment

Error FX-SCH-A-000952 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:IncludedTradeTax. The element is either missing or appears more than once.

What the rule means

The calculated tax amount is part of the tax information for the advance payment. Exactly one value is required so that this tax information contains an unambiguous amount.

Please provide the calculated tax amount for the advance payment exactly once

The calculated tax amount is missing from the advance payment’s tax information or appears more than once. The structure can be adjusted so that the amount occurs exactly once.

What to do
  1. Locate ram:IncludedTradeTax for the advance payment.
  2. Check that it contains ram:CalculatedAmount exactly once.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:IncludedTradeTax/>
✓ Correct
<ram:IncludedTradeTax>
  <ram:CalculatedAmount>10.00</ram:CalculatedAmount>
</ram:IncludedTradeTax>
Technical details

The rule checks whether ram:IncludedTradeTax has exactly one direct child element named ram:CalculatedAmount.

Where the rule applies

The rule applies within ram:IncludedTradeTax for the tax information of an advance payment.

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