Use one payment means code for all payment means

Error CII-SR-467 Syntax (UBL/CII)

- All Payment means type codes (BT-81) shall have the same value across all SpecifiedTradeSettlementPaymentMeans.

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

At least two ram:SpecifiedTradeSettlementPaymentMeans elements contain different values in ram:TypeCode.

What the rule means

The payment means code describes the payment method used. The same code must be given for all payment means in an invoice.

Affected fields BT-81
Please use the same payment means code for all payment means

The invoice contains payment means with different payment means codes. Use the same ram:TypeCode for all ram:SpecifiedTradeSettlementPaymentMeans elements.

What to do
  1. Review PaymentMeans.TypeCode and the payment means in FacturXInvoice.PaymentMeans.
  2. Make sure all ram:SpecifiedTradeSettlementPaymentMeans elements contain the same ram:TypeCode.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>30</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>42</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
✓ Correct
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>30</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:SpecifiedTradeSettlementPaymentMeans>
  <ram:TypeCode>30</ram:TypeCode>
</ram:SpecifiedTradeSettlementPaymentMeans>
Check in FactoorSharp
  • PaymentMeans.TypeCode (SpecifiedPaymentMeans: BT-81)
  • FacturXInvoice.PaymentMeans (ID: BT-81)
Technical details

The test compares each normalized ram:TypeCode with the first ram:TypeCode among all ram:SpecifiedTradeSettlementPaymentMeans elements and requires that none differ.

Where the rule applies

The rule applies in the invoice document rsm:CrossIndustryInvoice to all ram:SpecifiedTradeSettlementPaymentMeans elements and their ram:TypeCode.

Context (rule/@context)
/rsm:CrossIndustryInvoice
Test expression (assert/@test)
count(//ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode[normalize-space(.) != normalize-space((// ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode)[1])]) = 0