KVSKBAPmtQRCodeTextQRBill
Implements KVSKBAPaymentQRCodeGenerator. Summary: Implementation of KVSKBAPaymentQRCodeGenerator for the Swiss QR-Bill standard ("Swiss Payments Code"/SPC, Implementation Guidelines QR-bill), using the bank account information from Company Information as the beneficiary (payee). Note: the SEPA/EPC069-12 ("GiroCode") payment string used by KVSKBAPmtQRCodeTextEPC06912 is NOT recognized by Swiss banking apps - Switzerland requires this separate SPC payment string format instead, which is why a customer in Switzerland reports that "the QR code does not work" even though the same document layout works fine in Germany/Austria.
Procedures
BuildQRCodeText(Enum KVSKBAPaymentQRCodeDocType, Variant) : Text
Summary: Builds the Swiss QR-Bill (SPC) payment string for the given posted document, using the beneficiary (creditor) bank account information from Company Information and the debtor/document data provided by the KVSKBAPaymentQRCodeSourceDoc implementation registered for SourceDocType.
procedure BuildQRCodeText(SourceDocType: Enum "KVSKBAPaymentQRCodeDocType"; DocumentVariant: Variant): Text
Parameters:
SourceDocType: The type of the source document, e.g. Sales Invoice or Service Invoice.DocumentVariant: The posted document (matching SourceDocType) to build the payment QR code text for.
Returns: The multi-line (LF separated) payment string as defined by the Swiss QR-Bill (Implementation Guidelines QR-bill) standard.
GenerateQRCodeImage(Enum KVSKBAPaymentQRCodeDocType, Variant, Codeunit Temp Blob) : Boolean
procedure GenerateQRCodeImage(SourceDocType: Enum "KVSKBAPaymentQRCodeDocType"; DocumentVariant: Variant; var QRCodeImageTempBlob: Codeunit "Temp Blob"): Boolean
Events
OnBeforeExitBuildQRCodeText(Enum KVSKBAPaymentQRCodeDocType, Variant, Text) :
Summary: Integration event that fires right before BuildQRCodeText exits.
[IntegrationEvent(false, false)]
local procedure OnBeforeExitBuildQRCodeText(SourceDocType: Enum "KVSKBAPaymentQRCodeDocType"; DocumentVariant: Variant; var QRBillText: Text):
Parameters:
SourceDocType: The type of the source document, e.g. Sales Invoice or Service Invoice.DocumentVariant: The posted document the payment QR code text was built for.QRBillText: The generated Swiss QR-Bill (SPC) payment string; can be changed by subscribers.
Remarks: Use this event to override or adjust the payment string before it is returned/encoded into the QR code, e.g. to inject a structured QRR/SCOR payment reference instead of reference type "NON".