Direct Debit Mandates from Extensions
This event is obsolete. It passes the document number without the document type, so a posted invoice and a
posted credit memo with the same number cannot be told apart. Use
OnBeforeResolveDirectDebitMandateForDocument instead.
For payment means 59 (SEPA direct debit) mseDoc365 reads the mandate (BT-89) and the debtor IBAN (BT-91) from the BC table SEPA Direct Debit Mandate — see Payment Means. Some payment add-ons keep their mandates in their own tables. For them, mseDoc365 raises an integration event before it resolves the mandate.
Event
Table mseBC mseDoc365 S. Inv.Buffer (5563231):
[IntegrationEvent(false, false)]
local procedure OnBeforeResolveDirectDebitMandate(DocumentNo: Code[20]; BillToCustomerNo: Code[20]; SellToCustomerNo: Code[20]; DirectDebitMandateID: Code[35]; DueDate: Date; var ResolvedMandateID: Code[35]; var ResolvedDebtorIBAN: Code[50]; var IsHandled: Boolean)
| Parameter | Meaning |
|---|---|
DocumentNo | No. of the posted sales invoice or credit memo the xInvoice is built for |
BillToCustomerNo, SellToCustomerNo | Customers of the document |
DirectDebitMandateID | Mandate ID on the document (the original invoice's mandate for a credit memo), may be empty |
DueDate | Due date of the document |
ResolvedMandateID | Return the mandate reference (BT-89) |
ResolvedDebtorIBAN | Return the debtor IBAN (BT-91); spaces are removed |
IsHandled | Set to true to use the returned values instead of the standard resolution |
The event is raised only for payment means 59, for sales invoices and sales credit memos.
Rules for a handled mandate
- An empty
ResolvedMandateIDstops with the error No SEPA Direct Debit Mandate could be resolved …. - An empty
ResolvedDebtorIBANstops with the error The direct debit mandate … of customer … has no debtor IBAN. - The creditor ID (BT-90) is always resolved from the company bank account, as described on Payment Means.
Leave IsHandled at false to keep the standard resolution from the BC mandate table.