ram:GrandTotalAmount must occur exactly once

Error FX-SCH-A-000043 Factur-X

Element 'ram:GrandTotalAmount' 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:GrandTotalAmount is missing from ram:SpecifiedTradeSettlementHeaderMonetarySummation or occurs more than once. The rule requires exactly one such element.

What the rule means

ram:GrandTotalAmount gives the invoice total including VAT. A single value ensures that the total amount is stated unambiguously.

Please provide the invoice total exactly once

The invoice total is missing from the monetary settlement totals or entered more than once. You can resolve this by having exactly one ram:GrandTotalAmount.

What to do
  1. Find ram:SpecifiedTradeSettlementHeaderMonetarySummation in the invoice.
  2. Check that it contains exactly one ram:GrandTotalAmount.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementHeaderMonetarySummation/>
✓ Correct
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
  <ram:GrandTotalAmount>119.00</ram:GrandTotalAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
Technical details

The rule counts the ram:GrandTotalAmount elements directly under ram:SpecifiedTradeSettlementHeaderMonetarySummation and requires the count to equal one.

Where the rule applies

The rule applies to the monetary settlement totals in ram:SpecifiedTradeSettlementHeaderMonetarySummation.

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