Table of Contents

KVSKBADocumentVATInfoBuffer

Fields

Name Type Note
Doc Scope Enum (KVSKBADocumentScope)
Doc Type Enum (KVSKBADocumentType)
Doc No. Code[20]
Doc. No. Occurrence Integer
Version No. Integer
VAT Line Type Option OptionMembers: VATClause,VATSpec,VATSpecLCY,VATSpecPrepayment
Entry No. Integer
VAT Type Caption Option OptionMembers: VATClause,VATSpec,VATSpecLCY
VAT % Decimal
VAT Base Decimal
VAT Amount Decimal
Amount Including VAT Decimal
VAT Identifier Code[20]
Line Amount Decimal
Inv. Disc. Base Amount Decimal
Invoice Discount Amount Decimal
VAT Clause Code Code[20]
Description Text[250]
Description 2 Text[250]

Procedures

BuildFieldDataList(Record KVSKBADocumentHeaderBuffer) :

Summary: Builds the list of field data for the VAT info based on the provided document header buffer

procedure BuildFieldDataList(var tmpDocHeader: Record "KVSKBADocumentHeaderBuffer"): 

Parameters:

  • tmpDocHeader: The temporary document header buffer.

Remarks: This method populates the FieldDataList with the relevant fields and their captions/values for the VAT info section of a document. It uses the layout tokens defined in the document header buffer to ensure consistency in labeling.

GetFieldDataText() : Text

Summary: Returns the serialised field data list as a text string.

procedure GetFieldDataText(): Text

Returns: The complete field data list of this VAT info buffer record as text.

Remarks: The text representation is generated by the underlying FieldDataList codeunit and can be used for report layouts or further text processing.

AddCustomFields(Codeunit KVSKBAMasterDocFieldData) :

procedure AddCustomFields(var CustomFieldsDataList: Codeunit "KVSKBAMasterDocFieldData"): 

AddFieldValue(Text, Text) :

Summary: Adds or updates a key-value pair in the field data list of this VAT info buffer.

procedure AddFieldValue(LabelText: Text; ValueText: Text): 

Parameters:

  • LabelText: The label (key) of the field to add or update.
  • ValueText: The text value to store for the given label.

Remarks: If an entry with the same label already exists in the field data list it will be overwritten. Use this procedure to inject custom field values into the VAT info data set.

GetFieldValue(Text) : Text

Summary: Retrieves the value associated with the given label from the field data list.

procedure GetFieldValue(LabelText: Text): Text

Parameters:

  • LabelText: The label (key) whose value should be retrieved.

Returns: The text value stored for the given label, or an empty string if the label does not exist.

Remarks: Use this procedure to read back individual field values that were previously added via AddFieldValue or BuildFieldDataList.

GetTableType() : Enum

Summary: Returns the document table type corresponding to the VAT line type of this buffer record.

procedure GetTableType(): Enum KVSKBADocumentTableType

Returns: The matching KVSKBADocumentTableType enum value (VATClause, VATSpec, VATSpecLCY, or VATSpecPrepayment).

Remarks: The mapping is driven by the "VAT Line Type" field. If no matching VAT line type is found, no value is returned; ensure the field is set before calling this procedure.

GetLineType() : Enum

Summary: Returns the document line type for this VAT info buffer record.

procedure GetLineType(): Enum KVSKBADocumentLineType

Returns: Always returns KVSKBADocumentLineType::Default.

Remarks: VAT info buffer lines are always treated as default lines. Override this behaviour in an extension if a different line type classification is required.