Provide the allowance and charge basis no more than once

Error FX-SCH-A-000324 Factur-X

Element 'ram:AllowanceChargeBasisAmount' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:AllowanceChargeBasisAmount may occur no more than once in ram:ApplicableTradeTax. The rule fails if the element occurs more than once.

What the rule means

ram:AllowanceChargeBasisAmount contains the total of allowances and charges taken into account in the relevant VAT breakdown. Multiple occurrences would state this basis more than once.

Please provide the allowance and charge basis no more than once

ram:AllowanceChargeBasisAmount appears more than once in the VAT breakdown. You can resolve this by removing duplicate occurrences.

What to do
  1. Locate the relevant ram:ApplicableTradeTax.
  2. Check how many ram:AllowanceChargeBasisAmount elements it contains.
  3. Remove any extra occurrences so that no more than one remains.
  4. Generate the invoice again and validate it once more.
Technical details

The XPath test count(ram:AllowanceChargeBasisAmount)<=1 allows zero or one direct child element and disallows multiple occurrences.

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:AllowanceChargeBasisAmount)<=1