ram:DuePayableAmount must occur exactly once

Error FX-SCH-A-000044 Factur-X

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

What the rule means

ram:DuePayableAmount gives the amount still payable after accounting for the invoice amounts and payments already made. A single value makes the amount due unambiguous.

Please provide the amount still due on the invoice exactly once

The amount still due is missing from the monetary settlement totals or entered more than once. You can resolve this by having exactly one ram:DuePayableAmount.

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

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

Where the rule applies

The rule applies to the amount still due within the monetary settlement totals in ram:SpecifiedTradeSettlementHeaderMonetarySummation.

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