BR-DE-25-b
XRechnung 2.4.0 · UBL
Original rule text
[BR-DE-25-b] Wenn BT-81 "Payment means type code" einen Schlüssel für Lastschriften enthält (59), dürfen BG-17 und BG-18 nicht übermittelt werden.
not(cac:PayeeFinancialAccount) and not(cac:CardAccount)What this rule requires
The rule applies when the payment means type code (BT-81) is 59, meaning direct debit ("Lastschriften"). In that case, the payment means must not contain the child elements for BG-17 and BG-18. In UBL these are cac:PayeeFinancialAccount and cac:CardAccount; in CII the test requires absence of ram:PayeePartyCreditorFinancialAccount, ram:PayeeSpecifiedCreditorFinancialInstitution, ram:PayerSpecifiedDebtorFinancialInstitution, and ram:ApplicableTradeSettlementFinancialCard. The document fails validation if any of these are present together with code 59.
How to fix
Remove the forbidden child elements from the payment means that has code 59. In UBL, delete cac:PayeeFinancialAccount and cac:CardAccount from cac:PaymentMeans where cbc:PaymentMeansCode is '59'. In CII, delete ram:PayeePartyCreditorFinancialAccount, ram:PayeeSpecifiedCreditorFinancialInstitution, ram:PayerSpecifiedDebtorFinancialInstitution, and ram:ApplicableTradeSettlementFinancialCard from ram:SpecifiedTradeSettlementPaymentMeans where ram:TypeCode is '59'.
Guidance on this rule. The original text above is authoritative.