Table of Contents

KVSPSAREQuickEditPostPurchInv

Procedures

SetRecordToEdit(Record Purch. Inv. Header) :

Summary: Sets the Purchase Invoice to show in the page

procedure SetRecordToEdit(var PurchInvHeader: Record "Purch. Inv. Header"): 

Parameters:

  • PurchInvHeader: The Purchase Invoice to show

Events

KVSPSAREOnAfterCalcTotalAmountDepositAndApportionment(Record Purch. Inv. 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(PurchInvHeader: Record "Purch. Inv. 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:

  • PurchInvHeader: The Purchase Document currently being enabled
  • InvoiceAmountActual: The calculated actual invoice amount
  • InvoiceAmountShortage: The calculated invoice shortage amount
  • CurrAmountDeposits: The calculated current deposit amount
  • CumAmountDeposits: The calculated cumulated deposit amount
  • PaidAmountDeposits: The calculated already paid deposit amount
  • CurrAmountDefects: The calculated current defect amount
  • CumAmountDefects: The calculated cumulated defect amount
  • PaidAmountDefects: The calculated already paid defect amount
  • CurrAmountApportionments: The calculated current apportionment amount
  • CumAmountApportionments: The calculated cumulated apportionment amount
  • PaidAmountApportionments: The calculated already paid apportionment amount
  • CurrAmountInvoice: The calculated current invoice amount
  • CumAmountInvoice: The calculated cumulated invoice amount
  • PaidAmountInvoice: The calculated already paid invoice amount

KVSPSAREOnAfterGetPreviouslyPostedAmounts(Record Purch. Inv. 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(PurchInvHeader: Record "Purch. Inv. Header"; AdvanceChainNo: Integer; CalculationType: Enum "KVSPSAREAdvanceLineType"; FilterForDefects: Boolean; var PrevPostedPurchInvHeader: Record "Purch. Inv. Header"; var Result: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being edited
  • AdvanceChainNo: The Advance Chain related to the Purchase Document
  • CalculationType: The type of data which is currently calculated
  • FilterForDefects: Specifies whether defects need to be considered
  • PrevPostedPurchInvHeader: The filtered list of all Purchase Invoices relevant for the calculation
  • Result: The calculated Amount

KVSPSAREOnAfterSetRecordToEdit(Record Purch. Inv. 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 PurchInvHeader: Record "Purch. Inv. Header"): 

Parameters:

  • PurchInvHeader: The Purchase Document to edit

KVSPSAREOnBeforeCalcDocumentTypeCaption(Record Purch. Inv. 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(PurchInvHeader: Record "Purch. Inv. Header"; var Caption: Text): 

Parameters:

  • PurchInvHeader: The Purchase Document being edited
  • Caption: The caption to show at the top of the page

KVSPSAREOnBeforeFillProjectRelatedInformation(Record Purch. Inv. Header, List, List, Boolean) :

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeFillProjectRelatedInformation(PurchInvHeader: Record "Purch. Inv. Header"; var JobNoList: List; var WorkPackageList: List; var ShowPurchaseLinesForWorkPackages: Boolean): 

KVSPSAREOnBeforeGetProjectRelatedInformation(Record Purch. Inv. 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.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetProjectRelatedInformation(PurchInvHeader: Record "Purch. Inv. Header"; var IsHandled: Boolean): 

Parameters:

  • PurchInvHeader: The Purchase Document being edited
  • IsHandled: When set to true, the retrieval of project related information is skipped

KVSPSAREOnBeforeShowProjectRelatedInformation(Record Purch. Inv. Header, List, List, Option, Boolean, Boolean) :

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeShowProjectRelatedInformation(PurchInvHeader: Record "Purch. Inv. Header"; var JobNoList: List; var WorkPackageList: List; var DrillDownOption: Option; var ShowPurchaseLinesForWorkPackages: Boolean; var IsHandled: Boolean): 

Protected Variables

GlobalPrimaryInvoiceLine

Type: Record Purch. Inv. Line

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

GlobalSingleJobDescription

Type: Text

GlobalSingleWorkPackageDescription

Type: Text