Table of Contents

Table "Prepayment Inv. Line Buffer"

ID 461
Namespace: Microsoft.Finance.ReceivablesPayables

Buffer table for accumulating prepayment invoice line data before posting operations. Stores temporary line information for prepayment invoice creation and G/L posting.

Remarks

Used during prepayment invoice posting to organize and structure line data before creating the final invoice. Supports complex prepayment scenarios including VAT calculations, dimensions, and job-related prepayments. Provides grouping and accumulation capabilities for efficient prepayment invoice line processing. Integrates with sales and purchase prepayment posting workflows for consistent prepayment handling.

Properties

Name Value
Caption Prepayment Inv. Line Buffer
ReplicateData False
DataClassification CustomerContent

Fields

Name Type Description
"G/L Account No." Code[20]

G/L account number for posting the prepayment invoice line.

"Line No." Integer

Line number for ordering and identifying the prepayment invoice line.

Amount Decimal

Prepayment amount for the invoice line in document currency.

Description Text[100]

Description text for the prepayment invoice line.

"Gen. Bus. Posting Group" Code[20]

General business posting group for VAT and posting determination.

"Gen. Prod. Posting Group" Code[20]

General product posting group for VAT and posting determination.

"VAT Bus. Posting Group" Code[20]

VAT business posting group for VAT calculation.

"VAT Prod. Posting Group" Code[20]

VAT product posting group for VAT calculation.

"VAT Amount" Decimal

VAT amount calculated for the prepayment line.

"VAT Calculation Type" Enum Microsoft.Foundation.Enums."Tax Calculation Type"

VAT calculation type used for prepayment line tax calculation.

"VAT Base Amount" Decimal

VAT base amount for prepayment tax calculation.

"Amount (ACY)" Decimal

Prepayment amount in additional reporting currency.

"VAT Amount (ACY)" Decimal

VAT amount in additional reporting currency.

"VAT Base Amount (ACY)" Decimal

VAT base amount in additional reporting currency.

"VAT Difference" Decimal

VAT difference amount for manual VAT adjustments.

"VAT %" Decimal

VAT percentage rate for tax calculation.

"VAT Identifier" Code[20]

VAT identifier for grouping VAT entries.

"Global Dimension 1 Code" Code[20]

Global dimension 1 code for analytical reporting.

"Global Dimension 2 Code" Code[20]

Global dimension 2 code for analytical reporting.

"Job No." Code[20]

Project number for project-related prepayment tracking.

"Amount Incl. VAT" Decimal

Total amount including VAT for the prepayment line.

"Tax Area Code" Code[20]

Tax area code for sales tax calculation.

"Tax Liable" Boolean

Indicates if the line is subject to sales tax.

"Tax Group Code" Code[20]

Tax group code for sales tax calculation.

"Invoice Rounding" Boolean

Indicates if this line is for invoice rounding adjustment.

Adjustment Boolean

Indicates if this line is an adjustment entry.

"VAT Base Before Pmt. Disc." Decimal

VAT base amount before payment discount application.

"Orig. Pmt. Disc. Possible" Decimal

Original payment discount amount possible for the prepayment.

"Location Code" Code[10]

Location code for inventory tracking.

"Dimension Set ID" Integer

Dimension set ID for linking to dimension values.

"Job Task No." Code[20]

Project task number for project-related prepayment tracking.

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemCreatedByUserName Text[50]
SystemCreatedByFullName Text[80]
SystemModifiedByUserName Text[50]
SystemModifiedByFullName Text[80]
SystemRowVersion BigInteger

Methods

IncrAmounts

Increments amounts in the current record with amounts from another prepayment invoice line buffer. Adds all financial amounts including VAT, base amounts, and discount amounts.

procedure IncrAmounts(PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer with amounts to add

ReverseAmounts

Reverses all amounts in the current record by changing signs. Used for creating credit memo entries or reversing prepayment entries.

procedure ReverseAmounts()

SetAmounts

Sets the financial amounts for the prepayment invoice line buffer. Updates amount, VAT amounts, and base amounts in both LCY and ACY.

procedure SetAmounts(AmountLCY: Decimal; AmountInclVAT: Decimal; VATBaseAmount: Decimal; AmountACY: Decimal; VATBaseAmountACY: Decimal; VATDifference: Decimal)

Parameters

Name Type Description
AmountLCY Decimal

Amount in local currency

AmountInclVAT Decimal

Amount including VAT

VATBaseAmount Decimal

VAT base amount

AmountACY Decimal

Amount in additional currency

VATBaseAmountACY Decimal

VAT base amount in additional currency

VATDifference Decimal

VAT difference amount

InsertInvLineBuffer

Inserts or updates a prepayment invoice line buffer record. If record exists, increments amounts; otherwise inserts new record.

procedure InsertInvLineBuffer(PrepmtInvLineBuf2: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PrepmtInvLineBuf2 Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer to insert or merge

CopyWithLineNo

Copies a prepayment invoice line buffer record with a new line number. Creates a new record with the specified line number.

procedure CopyWithLineNo(PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; LineNo: Integer)

Parameters

Name Type Description
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Source prepayment invoice line buffer to copy

LineNo Integer

New line number for the copied record

CopyFromPurchLine

Copies posting group information from a purchase line to the prepayment buffer. Transfers VAT and posting group settings for prepayment processing.

procedure CopyFromPurchLine(PurchLine: Record "Purchase Line")

Parameters

Name Type Description
PurchLine Table Microsoft.Purchases.Document."Purchase Line"

Purchase line to copy posting groups from

CopyFromSalesLine

Copies posting group information from a sales line to the prepayment buffer. Transfers VAT and posting group settings for prepayment processing.

procedure CopyFromSalesLine(SalesLine: Record "Sales Line")

Parameters

Name Type Description
SalesLine Table Microsoft.Sales.Document."Sales Line"

Sales line to copy posting groups from

SetFilterOnPKey

Sets filters on the primary key fields of the prepayment invoice line buffer. Used for finding existing records with matching key values.

procedure SetFilterOnPKey(PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer with key values to filter by

FillAdjInvLineBuffer

Fills the buffer with adjustment invoice line data for amount corrections. Creates adjustment entries for prepayment amount differences.

procedure FillAdjInvLineBuffer(PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer"; GLAccountNo: Code[20]; CorrAmount: Decimal; CorrAmountACY: Decimal)

Parameters

Name Type Description
PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Source prepayment invoice line buffer

GLAccountNo Code[20]

G/L account number for the adjustment

CorrAmount Decimal

Correction amount in local currency

CorrAmountACY Decimal

Correction amount in additional currency

FillFromGLAcc

Fills the buffer with G/L account information for prepayment processing. Copies posting group information from the specified G/L account.

procedure FillFromGLAcc(CompressPrepayment: Boolean)

Parameters

Name Type Description
CompressPrepayment Boolean

Whether to use compressed description from G/L account name

AdjustVATBase

Adjusts VAT base amount and VAT amount based on provided adjustment values. Recalculates amount including VAT after adjustments.

procedure AdjustVATBase(VATAdjustment: array[2] of Decimal)

Parameters

Name Type Description
VATAdjustment array[2] of Decimal

Array containing base amount and VAT amount adjustments

AmountsToArray

Converts buffer amounts to an array format for processing. Returns base amount and VAT amount in array elements.

procedure AmountsToArray(var VATAmount: array[2] of Decimal)

Parameters

Name Type Description
VATAmount array[2] of Decimal

Array to receive amount and VAT amount values

CompressBuffer

Compresses multiple buffer lines with same key into consolidated entries. Combines amounts for lines with identical posting group and dimension combinations.

procedure CompressBuffer()

UpdateVATAmounts

Updates VAT amounts based on VAT posting setup and calculated percentages. Recalculates VAT amount in both local and additional reporting currency.

procedure UpdateVATAmounts()

Events

OnAfterCopyFromPurchLine

Integration event raised after copying data from a purchase line. Allows customization of purchase line data transfer to prepayment buffer.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromPurchLine(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; PurchaseLine: Record "Purchase Line")

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer being updated

PurchaseLine Table Microsoft.Purchases.Document."Purchase Line"

Source purchase line

OnAfterCopyFromSalesLine

Integration event raised after copying data from a sales line. Allows customization of sales line data transfer to prepayment buffer.

[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromSalesLine(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; SalesLine: Record "Sales Line")

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer being updated

SalesLine Table Microsoft.Sales.Document."Sales Line"

Source sales line

OnAfterIncrAmounts

Integration event raised after incrementing amounts in the buffer. Allows custom amount processing during buffer consolidation.

[IntegrationEvent(False,False)]
local procedure OnAfterIncrAmounts(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; PrepmtInvLineBuf: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Target prepayment invoice line buffer

PrepmtInvLineBuf Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Source prepayment invoice line buffer with amounts to add

OnAfterFillFromGLAcc

Integration event raised after filling buffer from G/L account. Allows customization of G/L account data transfer to prepayment buffer.

[IntegrationEvent(False,False)]
local procedure OnAfterFillFromGLAcc(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; GLAccount: Record "G/L Account"; CompressPayment: Boolean)

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer being updated

GLAccount Table Microsoft.Finance.GeneralLedger.Account."G/L Account"

Source G/L account

CompressPayment Boolean

Whether compression is enabled

OnAfterFillAdjInvLineBuffer

Integration event raised after filling adjustment invoice line buffer. Allows customization of adjustment line processing.

[IntegrationEvent(False,False)]
local procedure OnAfterFillAdjInvLineBuffer(PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var PrepaymentInvLineBufferRec: Record "Prepayment Inv. Line Buffer")

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Source prepayment invoice line buffer

PrepaymentInvLineBufferRec Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Target adjustment line buffer

OnAfterReverseAmounts

Integration event raised after reversing amounts in the buffer. Allows custom processing after amount reversal operations.

[IntegrationEvent(True,False)]
local procedure OnAfterReverseAmounts()

OnBeforeCompressBuffer

Integration event raised before compressing the buffer. Allows custom buffer compression logic or skipping standard compression.

[IntegrationEvent(False,False)]
local procedure OnBeforeCompressBuffer(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var IsHandled: Boolean)

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer to compress

IsHandled Boolean

Set to true to skip standard compression

OnBeforeFillFromGLAcc

Integration event raised before filling buffer from G/L account. Allows custom G/L account processing or skipping standard fill logic.

[IntegrationEvent(True,False)]
local procedure OnBeforeFillFromGLAcc(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; var IsHandled: Boolean)

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer to fill

IsHandled Boolean

Set to true to skip standard fill processing

OnAfterUpdateVATAmounts

Integration event raised after updating VAT amounts. Allows custom VAT amount processing after standard calculations.

[IntegrationEvent(True,False)]
local procedure OnAfterUpdateVATAmounts(var PrepaymentInvLineBuffer: Record "Prepayment Inv. Line Buffer"; Currency: Record Currency)

Parameters

Name Type Description
PrepaymentInvLineBuffer Table Microsoft.Finance.ReceivablesPayables."Prepayment Inv. Line Buffer"

Prepayment invoice line buffer with updated VAT amounts

Currency Table Microsoft.Finance.Currency.Currency

Currency record used for calculations

See also