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
Protected Variables#
GlobalPrimaryInvoiceLine#
Type: Record Purchase Line
TempGlobalAdvanceVendorLedgerEntry#
Type: Record Vendor Ledger Entry temporary
GlobalVATAmount#
Type: Decimal
GlobalVATAmountBase#
Type: Decimal
GlobalOrderAmount#
Type: Decimal
GlobalCumulatedInvoiceAmount#
Type: Decimal
GlobalInvoiceAmountActual#
Type: Decimal
GlobalInvoiceAmountShortage#
Type: Decimal
GlobalPreviousPayments#
Type: Decimal
GlobalPreviousPaymentsAfterFinalReduction#
Type: Decimal
GlobalPaymentCorrection#
Type: Decimal
GlobalFinalReduction#
Type: Decimal
GlobalPaymentDiscountPercentage#
Type: Decimal
GlobalPaymentDiscountAmount#
Type: Decimal
GlobalPaymentDiscountAmountInclVAT#
Type: Decimal
GlobalOriginalFinalReduction#
Type: Decimal
GlobalOriginalPaymentDiscountPercentage#
Type: Decimal
GlobalImportedAmountExclVAT#
Type: Decimal
GlobalImportedAmountInclVAT#
Type: Decimal
GlobalVESGuarNecessaryPercentage#
Type: Decimal
GlobalGLSGuarNecessaryPercentage#
Type: Decimal
GlobalCumAmountDeposits#
Type: Decimal
GlobalCumAmountApportionments#
Type: Decimal
GlobalCumAmountInvoice#
Type: Decimal
GlobalCumAmountDefects#
Type: Decimal
GlobalPaidAmountDeposits#
Type: Decimal
GlobalPaidAmountApportionments#
Type: Decimal
GlobalPaidAmountInvoice#
Type: Decimal
GlobalPaidAmountDefects#
Type: Decimal
GlobalCurrAmountDeposits#
Type: Decimal
GlobalCurrAmountApportionments#
Type: Decimal
GlobalCurrAmountInvoice#
Type: Decimal
GlobalCurrAmountDefects#
Type: Decimal
GlobalExternalComment#
Type: Text
GlobalInternalComment#
Type: Text
GlobalOrderNo#
Type: Code[20]
GlobalIsAdvanceInvoice#
Type: Boolean
GlobalShowPreviousPayments#
Type: Boolean
GlobalCommentRequired#
Type: Boolean