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#
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterSaveInvoiceAmountActualAndInvoiceAmountCorrection', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSaveInvoiceAmountActualAndInvoiceAmountCorrection(PurchaseHeader: Record "Purchase Header"; InvoiceAmountActual: Decimal; DifferenceAmount: Decimal)
begin
end;
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
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAddNewPurchaseLineOnAfterSetLineNo', '', false, false)]
local procedure DoSomethingKVSPSAREOnAddNewPurchaseLineOnAfterSetLineNo(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; PrimaryInvoiceLine: Record "Purchase Line"; LineType: Enum "KVSPSAREAdvanceLineType"; IsInvoiceShortage: Boolean; InsertAboveNonInvoiceLines: Boolean)
begin
end;
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
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterCalcTotalAmountDepositAndApportionment', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcTotalAmountDepositAndApportionment(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)
begin
end;
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
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"):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterSetRecordToEdit', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSetRecordToEdit(var PurchaseHeader: Record "Purchase Header")
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document to edit
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnLoadDeposits', '', false, false)]
local procedure DoSomethingKVSPSAREOnLoadDeposits(PurchaseHeader: Record "Purchase Header"; var BaseAmount: Decimal; var TempDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary)
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being editedBaseAmount
: The base amount for the calculation of the depositsTempDepositBuffer
: The temporary buffer containing all deposits
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnLoadApportionments', '', false, false)]
local procedure DoSomethingKVSPSAREOnLoadApportionments(PurchaseHeader: Record "Purchase Header"; var BaseAmount: Decimal; var AssignApportionmentBuffer: Record "KVSPSAREAssignApportBuffer" temporary)
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being editedBaseAmount
: The base amount for the calculation of the apportionmentsAssignApportionmentBuffer
: The temporary buffer containing all apportionments
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"):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterSavePaymentCorrection', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSavePaymentCorrection(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being editedPurchaseLine
: The newly created / updated Purchase Line for the Payment Correction
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"):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterSaveFinalReduction', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSaveFinalReduction(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being editedPurchaseLine
: The newly created / updated Purchase Line for the final reduction
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"):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterSavePaymentDiscountDate', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSavePaymentDiscountDate(var PurchaseHeader: Record "Purchase Header")
begin
end;
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"):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterSavePaymentDiscountPercentage', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSavePaymentDiscountPercentage(var PurchaseHeader: Record "Purchase Header")
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being edited
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"):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnSaveExternalCommentBeforeModify', '', false, false)]
local procedure DoSomethingKVSPSAREOnSaveExternalCommentBeforeModify(PurchaseHeader: Record "Purchase Header"; ExternalComment: Text; var PurchaseDocumentText: Record "KVSKBAPurchaseDocumentText")
begin
end;
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
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterAddNewPurchaseLineBeforeModify', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterAddNewPurchaseLineBeforeModify(var PurchaseLine: Record "Purchase Line"; LineType: Enum "KVSPSAREAdvanceLineType"; Description: Text[100]; InsertAboveNonInvoiceLines: Boolean; IsInvoiceShortage: Boolean)
begin
end;
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
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnAfterGetPreviouslyPostedAmounts', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterGetPreviouslyPostedAmounts(PurchaseHeader: Record "Purchase Header"; AdvanceChainNo: Integer; CalculationType: Enum "KVSPSAREAdvanceLineType"; FilterForDefects: Boolean; var PurchInvHeader: Record "Purch. Inv. Header"; var Result: Decimal)
begin
end;
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
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):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnBeforeCalcDocumentTypeCaption', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeCalcDocumentTypeCaption(PurchaseHeader: Record "Purchase Header"; var Caption: Text)
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being editedCaption
: The caption to show at the top of the page
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.
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetProjectRelatedInformation(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnBeforeGetProjectRelatedInformation', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeGetProjectRelatedInformation(PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)
begin
end;
Parameters:
PurchaseHeader
: The Purchase Document being editedIsHandled
: When set to true, the retrieval of project related information is skipped
KVSPSAREOnBeforeFillProjectRelatedInformation(Record Purchase Header, List, List, Boolean) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeFillProjectRelatedInformation(PurchaseHeader: Record "Purchase Header"; var JobNoList: List; var WorkPackageList: List; var ShowPurchaseLinesForWorkPackages: Boolean):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnBeforeFillProjectRelatedInformation', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeFillProjectRelatedInformation(PurchaseHeader: Record "Purchase Header"; var JobNoList: List; var WorkPackageList: List; var ShowPurchaseLinesForWorkPackages: Boolean)
begin
end;
KVSPSAREOnBeforeShowProjectRelatedInformation(Record Purchase Header, List, List, Option, Boolean, Boolean) :#
[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeShowProjectRelatedInformation(PurchaseHeader: Record "Purchase Header"; var JobNoList: List; var WorkPackageList: List; var DrillDownOption: Option; var ShowPurchaseLinesForWorkPackages: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Page, Page::"KVSPSAREQuickEditPurchInvoice", 'KVSPSAREOnBeforeShowProjectRelatedInformation', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeShowProjectRelatedInformation(PurchaseHeader: Record "Purchase Header"; var JobNoList: List; var WorkPackageList: List; var DrillDownOption: Option; var ShowPurchaseLinesForWorkPackages: Boolean; var IsHandled: Boolean)
begin
end;
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