KVSPSAREQuickEditPurchInvoice
Procedures
SetRecordToEdit(Record Purchase Header) :
Summary: Sets the Purchase Invoice to show in the page
procedure SetRecordToEdit(var PurchaseHeader: Record "Purchase Header"):
Parameters:
PurchaseHeader: The Purchase Invoice to show
Events
KVSPSAREOnAddNewPurchaseLineOnAfterSetLineNo(Record Purchase Header, Record Purchase Line, Record Purchase Line, Enum KVSPSAREAdvanceLineType, Boolean, Boolean) :
Summary: This event is triggered while creating a new purchase line for the document after the Line No. has been determined. Use this event to modify the Line No.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAddNewPurchaseLineOnAfterSetLineNo(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PrimaryInvoiceLine: Record "Purchase Line"; LineType: Enum "KVSPSAREAdvanceLineType"; IsInvoiceShortage: Boolean; InsertAboveNonInvoiceLines: Boolean):
Parameters:
PurchaseHeader: The Purchase Document being editedPurchaseLine: The newly created purchase linePrimaryInvoiceLine: The primary purchase line of the documentLineType: The type of the newly created lineIsInvoiceShortage: Specifies whether the new purchase line is an invoice shortageInsertAboveNonInvoiceLines: Specifies whether the new line should be inserted before apportionments, deposits and other reductions
KVSPSAREOnAfterAddNewPurchaseLineBeforeModify(Record Purchase Line, Enum KVSPSAREAdvanceLineType, Text[100], Boolean, Boolean) :
Summary: This event is triggered after a new Purchase Line has been created for the Document. use this event to make additional changes to the line.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterAddNewPurchaseLineBeforeModify(var PurchaseLine: Record "Purchase Line"; LineType: Enum "KVSPSAREAdvanceLineType"; Description: Text[100]; InsertAboveNonInvoiceLines: Boolean; IsInvoiceShortage: Boolean):
Parameters:
PurchaseLine: The newly created Purchase LineLineType: The type of line which needs to be createdDescription: The description suggested for the newly created purchase lineIsInvoiceShortage: Specifies whether the new purchase line is an invoice shortageInsertAboveNonInvoiceLines: Specifies whether the new line should be inserted before apportionments, deposits and other reductions
KVSPSAREOnAfterCalcTotalAmountDepositAndApportionment(Record Purchase Header, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal, Decimal) :
Summary: This event is triggered after the amounts for the currently edited purchase document have been calculated. Use this event to modify any of these values.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcTotalAmountDepositAndApportionment(PurchaseHeader: Record "Purchase Header"; var InvoiceAmountActual: Decimal; var InvoiceAmountShortage: Decimal; var CurrAmountDeposits: Decimal; var CumAmountDeposits: Decimal; var PaidAmountDeposits: Decimal; var CurrAmountDefects: Decimal; var CumAmountDefects: Decimal; var PaidAmountDefects: Decimal; var CurrAmountApportionments: Decimal; var CumAmountApportionments: Decimal; var PaidAmountApportionments: Decimal; var CurrAmountInvoice: Decimal; var CumAmountInvoice: Decimal; var PaidAmountInvoice: Decimal):
Parameters:
PurchaseHeader: The Purchase Document currently being enabledInvoiceAmountActual: The calculated actual invoice amountInvoiceAmountShortage: The calculated invoice shortage amountCurrAmountDeposits: The calculated current deposit amountCumAmountDeposits: The calculated cumulated deposit amountPaidAmountDeposits: The calculated already paid deposit amountCurrAmountDefects: The calculated current defect amountCumAmountDefects: The calculated cumulated defect amountPaidAmountDefects: The calculated already paid defect amountCurrAmountApportionments: The calculated current apportionment amountCumAmountApportionments: The calculated cumulated apportionment amountPaidAmountApportionments: The calculated already paid apportionment amountCurrAmountInvoice: The calculated current invoice amountCumAmountInvoice: The calculated cumulated invoice amountPaidAmountInvoice: The calculated already paid invoice amount
KVSPSAREOnAfterGetPreviouslyPostedAmounts(Record Purchase Header, Integer, Enum KVSPSAREAdvanceLineType, Boolean, Record Purch. Inv. Header, Decimal) :
Summary: This event is triggered after the previously posted amounts for various types have been calculated. Use this event to modify the calculated amounts.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterGetPreviouslyPostedAmounts(PurchaseHeader: Record "Purchase Header"; AdvanceChainNo: Integer; CalculationType: Enum "KVSPSAREAdvanceLineType"; FilterForDefects: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var Result: Decimal):
Parameters:
PurchaseHeader: The Purchase Document being editedAdvanceChainNo: The Advance Chain related to the Purchase DocumentCalculationType: The type of data which is currently calculatedFilterForDefects: Specifies whether defects need to be consideredPurchInvHeader: The filtered list of all Purchase Invoices relevant for the calculationResult: The calculated Amount
KVSPSAREOnAfterSaveFinalReduction(Record Purchase Header, Record Purchase Line) :
Summary: This event is triggered after the final reduction has been saved to the database. Use this event to make additional changes to the purchase line.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSaveFinalReduction(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseHeader: The Purchase Document being editedPurchaseLine: The newly created / updated Purchase Line for the final reduction
KVSPSAREOnAfterSaveInvoiceAmountActualAndInvoiceAmountCorrection(Record Purchase Header, Decimal, Decimal) :
Summary: This event is triggered after the invoice amount of a Document has been saved to the database.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSaveInvoiceAmountActualAndInvoiceAmountCorrection(PurchaseHeader: Record "Purchase Header"; InvoiceAmountActual: Decimal; DifferenceAmount: Decimal):
Parameters:
PurchaseHeader: The Purchase Document being editedInvoiceAmountActual: The actual Amount saved to the databaseDifferenceAmount: The difference between the previous and the current actual invoice amount
KVSPSAREOnAfterSavePaymentCorrection(Record Purchase Header, Record Purchase Line) :
Summary: This event is triggered after the payment correction has been saved to the database. Use this event to make additional changes to the purchase line.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSavePaymentCorrection(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseHeader: The Purchase Document being editedPurchaseLine: The newly created / updated Purchase Line for the Payment Correction
KVSPSAREOnAfterSavePaymentDiscountDate(Record Purchase Header) :
Summary: This event is triggered after the Payment Discount Date has been saved to the database. Use this event to make additinoal changes.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSavePaymentDiscountDate(var PurchaseHeader: Record "Purchase Header"):
Parameters:
PurchaseHeader: The Purchase Document being edited
KVSPSAREOnAfterSavePaymentDiscountPercentage(Record Purchase Header) :
Summary: This event is triggered after the Payment Discount Percentage has been saved to the database. Use this event to make additinoal changes.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSavePaymentDiscountPercentage(var PurchaseHeader: Record "Purchase Header"):
Parameters:
PurchaseHeader: The Purchase Document being edited
KVSPSAREOnAfterSetRecordToEdit(Record Purchase Header) :
Summary: This event is triggered after the record to edit has been set for this page. Use this event to store additional data.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSetRecordToEdit(var PurchaseHeader: Record "Purchase Header"):
Parameters:
PurchaseHeader: The Purchase Document to edit
KVSPSAREOnBeforeCalcDocumentTypeCaption(Record Purchase Header, Text) :
Summary: This event is triggered after the caption shown at the top of the page has been calculated. Use this event to set a diferent caption
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeCalcDocumentTypeCaption(PurchaseHeader: Record "Purchase Header"; var Caption: Text):
Parameters:
PurchaseHeader: The Purchase Document being editedCaption: The caption to show at the top of the page
KVSPSAREOnBeforeFillProjectRelatedInformation(Record Purchase Header, List, List, Boolean) :
KVSPSAREOnBeforeGetProjectRelatedInformation(Record Purchase Header, Boolean) :
Summary: This event is triggered before the project information related to the purchase header is retrieved on the card. Use this event to suppress the retrieval and visibility of project related information.
Parameters:
PurchaseHeader: The Purchase Document being editedIsHandled: When set to true, the retrieval of project related information is skipped
KVSPSAREOnBeforeShowProjectRelatedInformation(Record Purchase Header, List, List, Option, Boolean, Boolean) :
KVSPSAREOnLoadApportionments(Record Purchase Header, Decimal, Record KVSPSAREAssignApportBuffer) :
Summary: This event is triggered after the apportionments for the purchase Document have been calculated. Use this event to modify the apportionments.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnLoadApportionments(PurchaseHeader: Record "Purchase Header"; var BaseAmount: Decimal; var AssignApportionmentBuffer: Record "KVSPSAREAssignApportBuffer" temporary):
Parameters:
PurchaseHeader: The Purchase Document being editedBaseAmount: The base amount for the calculation of the apportionmentsAssignApportionmentBuffer: The temporary buffer containing all apportionments
KVSPSAREOnLoadDeposits(Record Purchase Header, Decimal, Record KVSADVAdvancePlanDeposit) :
Summary: This event is triggered after the deposits for the purchase Document have been calculated. Use this event to modify the deposits.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnLoadDeposits(PurchaseHeader: Record "Purchase Header"; var BaseAmount: Decimal; var TempDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary):
Parameters:
PurchaseHeader: The Purchase Document being editedBaseAmount: The base amount for the calculation of the depositsTempDepositBuffer: The temporary buffer containing all deposits
KVSPSAREOnSaveExternalCommentBeforeModify(Record Purchase Header, Text, Record KVSKBAPurchaseDocumentText) :
Summary: This event is triggered after the External Comments have been saved to the database. Use this event to make additional changes.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnSaveExternalCommentBeforeModify(PurchaseHeader: Record "Purchase Header"; ExternalComment: Text; var PurchaseDocumentText: Record "KVSKBAPurchaseDocumentText"):
Parameters:
PurchaseHeader: The Purchase Document being editedExternalComment: The external comment as provided by the userPurchaseDocumentText: The Purchase Document Text created to contain the external comment
Protected Variables
GlobalPrimaryInvoiceLine
Type: Record Purchase Line
TempGlobalAdvanceVendorLedgerEntry
Type: Record Vendor Ledger Entry temporary
GlobalCommentRequired
Type: Boolean
GlobalIsAdvanceInvoice
Type: Boolean
GlobalShowPreviousPayments
Type: Boolean
GlobalOrderNo
Type: Code[20]
GlobalSingleJobNo
Type: Code[20]
GlobalSingleWorkPackageNo
Type: Code[20]
GlobalCumAmountApportionments
Type: Decimal
GlobalCumAmountDefects
Type: Decimal
GlobalCumAmountDeposits
Type: Decimal
GlobalCumAmountInvoice
Type: Decimal
GlobalCurrAmountApportionments
Type: Decimal
GlobalCurrAmountDefects
Type: Decimal
GlobalCurrAmountDeposits
Type: Decimal
GlobalCurrAmountInvoice
Type: Decimal
GlobalPaidAmountApportionments
Type: Decimal
GlobalPaidAmountDefects
Type: Decimal
GlobalPaidAmountDeposits
Type: Decimal
GlobalPaidAmountInvoice
Type: Decimal
GlobalCumulatedInvoiceAmount
Type: Decimal
GlobalFinalReduction
Type: Decimal
GlobalInvoiceAmountActual
Type: Decimal
GlobalInvoiceAmountShortage
Type: Decimal
GlobalOrderAmount
Type: Decimal
GlobalPaymentCorrection
Type: Decimal
GlobalPaymentDiscountAmount
Type: Decimal
GlobalPaymentDiscountAmountInclVAT
Type: Decimal
GlobalPaymentDiscountPercentage
Type: Decimal
GlobalPreviousPayments
Type: Decimal
GlobalPreviousPaymentsAfterFinalReduction
Type: Decimal
GlobalGLSGuarNecessaryPercentage
Type: Decimal
GlobalImportedAmountExclVAT
Type: Decimal
GlobalImportedAmountInclVAT
Type: Decimal
GlobalVESGuarNecessaryPercentage
Type: Decimal
GlobalOriginalFinalReduction
Type: Decimal
GlobalOriginalPaymentDiscountPercentage
Type: Decimal
GlobalVATAmount
Type: Decimal
GlobalVATAmountBase
Type: Decimal
GlobalJobCount
Type: Integer
GlobalWorkPackageCount
Type: Integer
GlobalExternalComment
Type: Text
GlobalInternalComment
Type: Text
GlobalSingleJobDescription
Type: Text
GlobalSingleWorkPackageDescription
Type: Text