Table of Contents

KVSKBAEDocExportExtTextLib

Summary: Retrieves posted sales and service document texts for XRechnung, ZUGFeRD, and PEPPOL BIS 3.0 E-Document exports.

Remarks: The retrieved texts are exported as BT-22 (Invoice Note) and BT-127 (Invoice Line Note) for invoices and credit memos. The caller supplies the export settings, which determine whether beginning or ending texts are selected and the maximum exported text length. PEPPOL resolves these settings from the bill-to customer, using Sales & Receivables Setup when the customer setting is Default. Empty text is returned when no matching text is available.

Procedures

GetPostedDocumentText(RecordRef, Integer, Enum KVSKBAEDocExtendTextExportType, Integer) : Text

Summary: Gets the posted invoice or credit memo text for the source document and line.

procedure GetPostedDocumentText(SourceDocumentHeader: RecordRef; LineNo: Integer; EDocExtendTextExportType: Enum "KVSKBAEDocExtendTextExportType"; EDocExtTextMaxExpLength: Integer): Text

Parameters:

  • SourceDocumentHeader: The posted sales or service invoice or credit memo header.
  • LineNo: The posted document line number, or zero to get the header text.
  • EDocExtendTextExportType: Specifies whether all texts, beginning texts, or ending texts are included.
  • EDocExtTextMaxExpLength: The maximum text length; zero means no length limit.

Returns: The selected text, or an empty string if no matching text is available.

Remarks: Supports posted sales and service invoices and credit memos. This overload selects the text source from the source header table and uses the supplied posted document line number for line text. This procedure is designed for standard Peppol BIS 3.0 implementations.

GetPostedDocumentText(Record Sales Invoice Header, Enum KVSKBAEDocExtendTextExportType, Integer) : Text

Summary: Gets the header text for the specified sales invoice header.

procedure GetPostedDocumentText(SalesInvoiceHeader: Record "Sales Invoice Header"; EDocExtendTextExportType: Enum "KVSKBAEDocExtendTextExportType"; EDocExtTextMaxExpLength: Integer): Text

Parameters:

  • SalesInvoiceHeader: The sales invoice header whose SystemId is used to identify its posted sales invoice.
  • EDocExtendTextExportType: Specifies whether all texts, beginning texts, or ending texts are included.
  • EDocExtTextMaxExpLength: The maximum text length; zero means no length limit.

Returns: The selected header text, or an empty string if no matching text is available.

Remarks: Sales invoice texts are used only when the header has a non-empty SystemId matching the posted invoice with the same document number and SystemId. If that match is not found, service invoice texts are used. This procedure is designed for standard ZUGFeRD and XRechnung implementations.

GetPostedDocumentText(Record Sales Cr.Memo Header, Enum KVSKBAEDocExtendTextExportType, Integer) : Text

Summary: Gets the header text for the specified sales credit memo header.

procedure GetPostedDocumentText(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; EDocExtendTextExportType: Enum "KVSKBAEDocExtendTextExportType"; EDocExtTextMaxExpLength: Integer): Text

Parameters:

  • SalesCrMemoHeader: The sales credit memo header whose SystemId is used to identify its posted sales credit memo.
  • EDocExtendTextExportType: Specifies whether all texts, beginning texts, or ending texts are included.
  • EDocExtTextMaxExpLength: The maximum text length; zero means no length limit.

Returns: The selected header text, or an empty string if no matching text is available.

Remarks: Sales credit memo texts are used only when the header has a non-empty SystemId matching the posted credit memo with the same document number and SystemId. If that match is not found, service credit memo texts are used. This procedure is designed for standard ZUGFeRD and XRechnung implementations.

GetPostedDocumentText(Record Sales Invoice Line, Enum KVSKBAEDocExtendTextExportType, Integer) : Text

Summary: Gets the line text for the specified sales invoice line.

procedure GetPostedDocumentText(var SalesInvoiceLine: Record "Sales Invoice Line"; EDocExtendTextExportType: Enum "KVSKBAEDocExtendTextExportType"; EDocExtTextMaxExpLength: Integer): Text

Parameters:

  • SalesInvoiceLine: The sales invoice line whose document and line numbers identify the text.
  • EDocExtendTextExportType: Specifies whether all texts, beginning texts, or ending texts are included.
  • EDocExtTextMaxExpLength: The maximum text length; zero means no length limit.

Returns: The selected line text, or an empty string if no matching text is available.

Remarks: Temporary sales invoice lines mapped from service documents use service invoice texts. Non-temporary lines use sales invoice texts. This procedure is designed for standard ZUGFeRD and XRechnung implementations.

GetPostedDocumentText(Record Sales Cr.Memo Line, Enum KVSKBAEDocExtendTextExportType, Integer) : Text

Summary: Gets the line text for the specified sales credit memo line.

procedure GetPostedDocumentText(var SalesCrMemoLine: Record "Sales Cr.Memo Line"; EDocExtendTextExportType: Enum "KVSKBAEDocExtendTextExportType"; EDocExtTextMaxExpLength: Integer): Text

Parameters:

  • SalesCrMemoLine: The sales credit memo line whose document and line numbers identify the text.
  • EDocExtendTextExportType: Specifies whether all texts, beginning texts, or ending texts are included.
  • EDocExtTextMaxExpLength: The maximum text length; zero means no length limit.

Returns: The selected line text, or an empty string if no matching text is available.

Remarks: Temporary sales credit memo lines mapped from service documents use service credit memo texts. Non-temporary lines use sales credit memo texts. This procedure is designed for standard ZUGFeRD and XRechnung implementations.