BR-DE-23-b
XRechnung 2.0.0 · CII
Original rule text
[BR-DE-23-b] Wenn BT-81 "Payment means type code" einen Schlüssel für Überweisungen enthält (30, 58), dürfen BG-18 und BG-19 nicht übermittelt werden.
not(ram:ApplicableTradeSettlementFinancialCard) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID or ram:PayerPartyDebtorFinancialAccount/ram:IBANID)What this rule requires
The rule applies when PaymentMeansCode (BT-81) contains a transfer key 30 or 58. In UBL, the cac:PaymentMeans must then not contain cac:CardAccount (BG-18) or cac:PaymentMandate (BG-19). In CII, ram:SpecifiedTradeSettlementPaymentMeans must not contain ram:ApplicableTradeSettlementFinancialCard, and must not have DirectDebitMandateID, CreditorReferenceID, or PayerPartyDebtorFinancialAccount/IBANID present. The test uses and, so a single forbidden element causes failure. This is a fatal rule, so the document is rejected.
How to fix
Remove the conflicting elements from the payment means that uses code 30 or 58. In UBL, delete any cac:CardAccount and cac:PaymentMandate inside that cac:PaymentMeans. In CII, delete ram:ApplicableTradeSettlementFinancialCard and remove any DirectDebitMandateID, CreditorReferenceID, and PayerPartyDebtorFinancialAccount/IBANID associated with the payment means.
Guidance on this rule. The original text above is authoritative.