XRechnung 2.2.0 · UBL

BR-DE-31

XRechnung 2.2.0 · UBL

fatalcountry

Original rule text

[BR-DE-31] Wenn "DIRECT DEBIT" BG-19 vorhanden ist, dann muss "Debited account identifier" BT-91 übermittelt werden.

Stored validation assertion
not(cac:PaymentMeans/cac:PaymentMandate) or (cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID)

What this rule requires

This fatal rule requires that when a direct debit (BG-19) is present, the debited account identifier (BT-91) must be transmitted. In UBL, if cac:PaymentMeans/cac:PaymentMandate exists, then cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID must also exist. In CII, the rule passes either when none of ram:DirectDebitMandateID (BT-89), ram:CreditorReferenceID (BT-90), or ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID (BT-91) exists, or when at least one of BT-89/BT-90 exists together with BT-91; BT-91 alone is not sufficient.

How to fix

For UBL, add cac:PaymentMeans/cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID with the debited account identifier (BT-91) when cac:PaymentMeans/cac:PaymentMandate is present. For CII, ensure ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID (BT-91) is present when ram:DirectDebitMandateID (BT-89) or ram:CreditorReferenceID (BT-90) is present; conversely, if you provide BT-91, also provide at least one of BT-89 or BT-90.

Guidance on this rule. The original text above is authoritative.