Skip to content

KVSPSAREQuickEditPurchInvMgt#

Procedures#

GetOrderDetailsForAdvanceInvoice(Enum KVSADVAdvanceDocumentType, Integer, Code[20], Decimal, Decimal, Decimal) : Boolean#

Summary: Calculates the order based information of a Purchase Advance Invoice relevant for the Quick Edit and the Invoice Sheet

procedure GetOrderDetailsForAdvanceInvoice(AdvanceDocumentType: Enum "KVSADVAdvanceDocumentType"; AdvanceChainNo: Integer; var OrderNo: Code[20]; var OrderAmount: Decimal; var VESGuarNecessaryPercentage: Decimal; var GLSGuarNecessaryPercentage: Decimal): Boolean

Parameters:

  • AdvanceDocumentType: Specifies the type of the Advance Document to consider
  • AdvanceChainNo: Specifies the Advance Chain related to the Advance Invoice
  • OrderNo: Will be set to the Order No. related to the Advance Invoice
  • OrderAmount: Will be set to the net Amount of the Order related to the Advance Invoice
  • VESGuarNecessaryPercentage: Will be set to the VES % of the Order related to the Advance Invoice
  • GLSGuarNecessaryPercentage: Will be set to the GLS % of the Order related to the Advance Invoice

Returns: Specifies whether an Order could been found

GetOrderDetailsForClosingInvoice(Code[20], Boolean, Code[20], Decimal, Decimal, Decimal) : Boolean#

Summary: Calculates the order based information of a Purchase Closing Invoice relevant for the Quick Edit and the Invoice Sheet

procedure GetOrderDetailsForClosingInvoice(InvoiceNo: Code[20]; InvoiceIsPosted: Boolean; var OrderNo: Code[20]; var OrderAmount: Decimal; var VESGuarNecessaryPercentage: Decimal; var GLSGuarNecessaryPercentage: Decimal): Boolean

Parameters:

  • InvoiceNo: The No. of the Invoice
  • InvoiceIsPosted: Specifies whether the Invoice has already been posted
  • OrderNo: Will be set to the Order No. related to the Advance Invoice
  • OrderAmount: Will be set to the net Amount of the Order related to the Invoice
  • VESGuarNecessaryPercentage: Will be set to the VES % of the Order related to the Invoice
  • GLSGuarNecessaryPercentage: Will be set to the GLS % of the Order related to the Invoice

Returns: Specifies whether an Order could been found

GetBaseInvoiceAmounts(Record Purchase Header, Decimal, Decimal, Decimal) :#

Summary: Calculates the Invoice Amounts displayed in the Quick Edit for a Purchase Document

procedure GetBaseInvoiceAmounts(PurchaseHeader: Record "Purchase Header"; var CumulatedInvoiceAmount: Decimal; var InvoiceAmountActual: Decimal; var InvoiceAmountShortage: Decimal): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • CumulatedInvoiceAmount: Will be set to the calculated cumulated Amount
  • InvoiceAmountActual: Will be set to the calculated current Amount
  • InvoiceAmountShortage: Will be set to the calculated Shortage Amount

GetBaseInvoiceAmounts(Record Purch. Inv. Header, Decimal, Decimal, Decimal) :#

Summary: Calculates the Invoice Amounts displayed in the Invoice Sheet for a posted Purchase Document

procedure GetBaseInvoiceAmounts(PurchInvHeader: Record "Purch. Inv. Header"; var CumulatedInvoiceAmount: Decimal; var InvoiceAmountActual: Decimal; var InvoiceAmountShortage: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • CumulatedInvoiceAmount: Will be set to the calculated cumulated Amount
  • InvoiceAmountActual: Will be set to the calculated current Amount
  • InvoiceAmountShortage: Will be set to the calculated Shortage Amount

GetPaymentCorrection(Record Purchase Header, Decimal) :#

Summary: Calculates the current Payment Correction Amount for a Purchase Document

procedure GetPaymentCorrection(PurchaseHeader: Record "Purchase Header"; var PaymentCorrection: Decimal): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PaymentCorrection: Will be set to the calculated Amount

GetPaymentCorrection(Record Purch. Inv. Header, Decimal) :#

Summary: Calculates the current Payment Correction Amount for a Purchase Document

procedure GetPaymentCorrection(PurchInvHeader: Record "Purch. Inv. Header"; var PaymentCorrection: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • PaymentCorrection: Will be set to the calculated Amount

GetFinalReduction(Record Purchase Header, Decimal) :#

Summary: Calculates the final Invoice Reduction Amount for a Purchase Document

procedure GetFinalReduction(PurchaseHeader: Record "Purchase Header"; var FinalReduction: Decimal): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • FinalReduction: Will be set to the calculated Amount

GetFinalReduction(Record Purch. Inv. Header, Decimal) :#

Summary: Calculates the final Invoice Reduction Amount for a Purchase Document

procedure GetFinalReduction(PurchInvHeader: Record "Purch. Inv. Header"; var FinalReduction: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • FinalReduction: Will be set to the calculated Amount

GetPreviousPayments(Record Purchase Header, Decimal) :#

Summary: Calculates the previous Payment Amount for a Purchase Document

procedure GetPreviousPayments(PurchaseHeader: Record "Purchase Header"; var PreviousPayments: Decimal): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PreviousPayments: Will be set to the calculated Amount

GetPreviousPaymentsAfterFinalReductions(Record Purchase Header, Decimal, Decimal) :#

Summary: Calculates the previous Payment Amount for a Purchase Document after final reductions have been considered

procedure GetPreviousPaymentsAfterFinalReductions(PurchaseHeader: Record "Purchase Header"; PreviousPaymentsBeforeFinalReduction: Decimal; var PreviousPaymentsAfterFinalReduction: Decimal): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PreviousPaymentsBeforeFinalReduction: The previous payment amount before final reductions have been considered
  • PreviousPaymentsAfterFinalReduction: Will be set to the calculated Amount

GetPreviousPayments(Record Purch. Inv. Header, Decimal) :#

Summary: Calculates the previous payment amount for a posted Invoice. For Advance Invoices: Returns the Net Amount of the cumulated payments within the Advance Invoice For Closing Invoices: Returns the Gross Amount of the applied Closing Credit Memos

procedure GetPreviousPayments(PurchInvHeader: Record "Purch. Inv. Header"; var PreviousPayments: Decimal): 

Parameters:

  • PurchInvHeader: The Invoice being calculated
  • PreviousPayments: Will be set to the calculated amount

GetApportionAmountForInvoicePayments(Record Purch. Inv. Header, Decimal) :#

Summary: Calculates the Apportionment Amount for a posted Purchase Document

procedure GetApportionAmountForInvoicePayments(PurchInvHeader: Record "Purch. Inv. Header"; var TotalApportionAmount: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • TotalApportionAmount: Will be set to the calculated Amount

CalcTotalPaymentDiscountAmount(Record Purch. Inv. Header, Decimal, Decimal, Boolean, Decimal) :#

Summary: Calculates the payment discount amount for a posted Purchase Document

procedure CalcTotalPaymentDiscountAmount(PurchInvHeader: Record "Purch. Inv. Header"; var PaymentDiscountAmount: Decimal; PaymentDiscountPercentage: Decimal; PmtDiscExclVAT: Boolean; AmountRoundingPrecision: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • PaymentDiscountAmount: Will be set to the calculated Amount
  • PaymentDiscountPercentage: Specifies the payment discount percentage to be calculated
  • PmtDiscExclVAT: Specifies whether the result should include VAT
  • AmountRoundingPrecision: Specifies the desired Rounding Precision for the result

CalcPostedPurchInvTotalBaseAmountForApportionments(Record Purch. Inv. Header) : Decimal#

Summary: Calculates the base invoice amount for a posted Purchase Document

procedure CalcPostedPurchInvTotalBaseAmountForApportionments(PurchInvHeader: Record "Purch. Inv. Header"): Decimal

Parameters:

  • PurchInvHeader: The Purchase Document being calculated

Returns: Will be set to the calculated Amount

CalcApportionmentBufferForPurchInvoice(Record Purch. Inv. Header, Decimal, Record KVSPSAREAssignApportBuffer, Boolean) :#

Summary: Calculates the Apportionments contained in a posted Purchase Document

procedure CalcApportionmentBufferForPurchInvoice(PurchInvHeader: Record "Purch. Inv. Header"; BaseAmount: Decimal; var AssignApportBuffer: Record "KVSPSAREAssignApportBuffer"; RetrieveApportionmentPercentageFromPurchLineAmounts: Boolean): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • BaseAmount: The base Amount of the Purchase Document
  • AssignApportBuffer: Will be populated with the apportionments contained in the Purchase Documents
  • RetrieveApportionmentPercentageFromPurchLineAmounts: Specifies whether the apportionment percentages should be recalculated based on the current amounts of the Purchase Document

GetDepositsForPostedPurchInvoice(Record Purch. Inv. Header, Record KVSADVAdvancePlanDeposit, Decimal) :#

Summary: Calculates the Deposits contained in a posted Purchase Document

procedure GetDepositsForPostedPurchInvoice(PurchInvHeader: Record "Purch. Inv. Header"; var TempDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; InvoiceAmountActual: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • TempDepositBuffer: Will be populated with the deposits contained in the Purchase Documents
  • InvoiceAmountActual: Specifies the base Amount of the Purchase Document

IsAdvanceInvoice(Record Purchase Header) : Boolean#

Summary: Calculated whether a Purchase Document is being considered an Advance Document

procedure IsAdvanceInvoice(PurchaseHeader: Record "Purchase Header"): Boolean

Parameters:

  • PurchaseHeader: The Purchase Document being calculated

Returns: Specifies whether the Purchase Document is considered an Advance Document

IsAdvanceInvoice(Record Purch. Inv. Header) : Boolean#

Summary: Calculated whether a Purchase Document is being considered an Advance Document

procedure IsAdvanceInvoice(PurchInvHeader: Record "Purch. Inv. Header"): Boolean

Parameters:

  • PurchInvHeader: The Purchase Document being calculated

Returns: Specifies whether the Purchase Document is considered an Advance Document

GetImportedAmounts(Record Purchase Header, Decimal, Decimal) :#

Summary: Calculates the Invoice Amounts of a Purchase Document as stated by the Vendor

procedure GetImportedAmounts(PurchaseHeader: Record "Purchase Header"; var ImportedAmountExclVAT: Decimal; var ImportedAmountInclVAT: Decimal): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • ImportedAmountExclVAT: The Amount excl. VAT stated by the Vendor
  • ImportedAmountInclVAT: The Amount incl. VAT stated by the Vendor

GetImportedAmountClosInvPaymentAmount(Record Purchase Header, Decimal, Boolean) :#

Summary: Calculates the closing Invoice Amounts of a Purchase Document after reduction of Advances as stated by the Vendor

procedure GetImportedAmountClosInvPaymentAmount(PurchaseHeader: Record "Purchase Header"; var ClosInvoiceAmount: Decimal; var IsClosInvoiceAmountAfterGLS: Boolean): 

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • ClosInvoiceAmount: The Amount excl. VAT after reduction of Advances stated by the Vendor
  • IsClosInvoiceAmountAfterGLS: Specifies whether the Vendor has already considered the GLS Deposits in their stated amounts

GetImportedAmounts(Record Purch. Inv. Header, Decimal, Decimal) :#

Summary: Calculates the Invoice Amounts of a Purchase Document as stated by the Vendor

procedure GetImportedAmounts(PurchInvHeader: Record "Purch. Inv. Header"; var ImportedAmountExclVAT: Decimal; var ImportedAmountInclVAT: Decimal): 

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • ImportedAmountExclVAT: The Amount excl. VAT stated by the Vendor
  • ImportedAmountInclVAT: The Amount incl. VAT stated by the Vendor

OpenQuickEditByNotification(Notification) :#

Summary: Opens the Quick Edit Page by a Notification

procedure OpenQuickEditByNotification(Notification: Notification): 

Parameters:

  • Notification: The Notification containing the Document No. to open

CalcBaseAmountForDeposits(Record Purchase Header, Decimal) : Decimal#

Summary: Calculates the Base Amount for Deposits for a Purchase Document

procedure CalcBaseAmountForDeposits(PurchaseHeader: Record "Purchase Header"; InvoiceAmountActual: Decimal): Decimal

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • InvoiceAmountActual: The current Invoice Amount

Returns: The calculated Base Amount for Deposits

Events#

KVSPSAREOnBeforeInsertApportionmentBufferForPurchInvLine(Record KVSPSAREApportionment, Record Purch. Inv. Header, Record Purch. Inv. Line, Decimal, Record KVSPSAREAssignApportBuffer) :#

Summary: This event is triggered before an apportionment buffer entry for a Purchase Line is being created. Use this event to transfer additional data to the apportionment buffer.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeInsertApportionmentBufferForPurchInvLine(Apportionment: Record "KVSPSAREApportionment"; PurchInvHeader: Record "Purch. Inv. Header"; PurchInvLine: Record "Purch. Inv. Line"; BaseAmount: Decimal; var AssignApportBuffer: Record "KVSPSAREAssignApportBuffer"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeInsertApportionmentBufferForPurchInvLine', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeInsertApportionmentBufferForPurchInvLine(Apportionment: Record "KVSPSAREApportionment"; PurchInvHeader: Record "Purch. Inv. Header"; PurchInvLine: Record "Purch. Inv. Line"; BaseAmount: Decimal; var AssignApportBuffer: Record "KVSPSAREAssignApportBuffer")
begin
end;

Parameters:

  • Apportionment: The Apportionment related to the buffer entry
  • PurchInvHeader: The Purchase Document being calculated
  • PurchInvLine: The Purchase Line to create an apportionment buffer entry from
  • BaseAmount: The base Amount of the Purchase Document
  • AssignApportBuffer: The newly created Apportionment Buffer

KVSPSAREOnBeforeGetImportedAmountsPurchaseHeader(Record Purchase Header, Decimal, Decimal, Boolean) :#

Summary: This event is triggered before the Invoice Amounts stated by the vendor are read. Use this event to implement other data sources for the Vendor Amounts.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetImportedAmountsPurchaseHeader(PurchaseHeader: Record "Purchase Header"; var ImportedAmountExclVAT: Decimal; var ImportedAmountInclVAT: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeGetImportedAmountsPurchaseHeader', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeGetImportedAmountsPurchaseHeader(PurchaseHeader: Record "Purchase Header"; var ImportedAmountExclVAT: Decimal; var ImportedAmountInclVAT: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • ImportedAmountExclVAT: The amount excl. VAT as stated by the vendor
  • ImportedAmountInclVAT: The amount incl. VAT as stated by the vendor
  • IsHandled: Set to true to skip the default calculation

KVSPSAREOnBeforeGetImportedAmountsPurchaseInvoiceHeader(Record Purch. Inv. Header, Decimal, Decimal, Boolean) :#

Summary: This event is triggered before the Invoice Amounts stated by the vendor are read. Use this event to implement other data sources for the Vendor Amounts.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetImportedAmountsPurchaseInvoiceHeader(PurchInvHeader: Record "Purch. Inv. Header"; var ImportedAmountExclVAT: Decimal; var ImportedAmountInclVAT: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeGetImportedAmountsPurchaseInvoiceHeader', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeGetImportedAmountsPurchaseInvoiceHeader(PurchInvHeader: Record "Purch. Inv. Header"; var ImportedAmountExclVAT: Decimal; var ImportedAmountInclVAT: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • ImportedAmountExclVAT: The amount excl. VAT as stated by the vendor
  • ImportedAmountInclVAT: The amount incl. VAT as stated by the vendor
  • IsHandled: Set to true to skip the default calculation

KVSPSAREOnBeforeGetImportedAmountClosInvPaymentAmount(Record Purchase Header, Decimal, Boolean, Boolean) :#

Summary: This event is triggered before the Invoice Amounts for a Closing Invoice stated by the vendor are read. Use this event to implement other data sources for the Vendor Amounts.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetImportedAmountClosInvPaymentAmount(PurchaseHeader: Record "Purchase Header"; var ClosInvoiceAmount: Decimal; var IsClosInvoiceAmountAfterGLS: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeGetImportedAmountClosInvPaymentAmount', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeGetImportedAmountClosInvPaymentAmount(PurchaseHeader: Record "Purchase Header"; var ClosInvoiceAmount: Decimal; var IsClosInvoiceAmountAfterGLS: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • ClosInvoiceAmount: The Amount excl. VAT after reduction of Advances stated by the Vendor
  • IsClosInvoiceAmountAfterGLS: Specifies whether the Vendor has already considered the GLS Deposits in their stated amounts
  • IsHandled: Set to true to skip the default calculation

KVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLine(Enum KVSADVAdvanceDocumentType, Integer, Code[20], Record Purchase Line) :#

Summary: This event is triggered when the information of the order related to a Advance Invoice is read and the filters for the relevant Order Lines are set. Use this event to assign additional filters

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLine(AdvanceDocumentType: Enum "KVSADVAdvanceDocumentType"; AdvanceChainNo: Integer; var OrderNo: Code[20]; var OrderPurchaseLine: Record "Purchase Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLine', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLine(AdvanceDocumentType: Enum "KVSADVAdvanceDocumentType"; AdvanceChainNo: Integer; var OrderNo: Code[20]; var OrderPurchaseLine: Record "Purchase Line")
begin
end;

Parameters:

  • AdvanceDocumentType: The Document Type of the Advance Document
  • AdvanceChainNo: The Advance Chain related to the Invoice
  • OrderNo: The Order related to the Invoice
  • OrderPurchaseLine: The filtered Order lines

KVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLineArchive(Enum KVSADVAdvanceDocumentType, Integer, Code[20], Record Purchase Line Archive) :#

Summary: This event is triggered when the information of the order related to a Advance Invoice is read and the filters for the relevant Order Lines are set. Use this event to assign additional filters

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLineArchive(AdvanceDocumentType: Enum "KVSADVAdvanceDocumentType"; AdvanceChainNo: Integer; var OrderNo: Code[20]; var OrderPurchaseLineArchive: Record "Purchase Line Archive"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLineArchive', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetOrderDetailsForAdvanceInvoiceOnAfterSetFilterPurchaseLineArchive(AdvanceDocumentType: Enum "KVSADVAdvanceDocumentType"; AdvanceChainNo: Integer; var OrderNo: Code[20]; var OrderPurchaseLineArchive: Record "Purchase Line Archive")
begin
end;

Parameters:

  • AdvanceDocumentType: The Document Type of the Advance Document
  • AdvanceChainNo: The Advance Chain related to the Invoice
  • OrderNo: The Order related to the Invoice
  • OrderPurchaseLineArchive: The filtered Order lines

KVSPSAREOnGetBaseInvoiceAmountsPurchHeaderOnAfterSetFilter(Record Purchase Header, Record Purchase Line) :#

Summary: This event is triggered when calculating the base amounts of an Invoice after the filters for the relevant Invoice Lines are set. Use this event to assign additional filters

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetBaseInvoiceAmountsPurchHeaderOnAfterSetFilter(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetBaseInvoiceAmountsPurchHeaderOnAfterSetFilter', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetBaseInvoiceAmountsPurchHeaderOnAfterSetFilter(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PurchaseLine: The filtered Invoice Lines

KVSPSAREOnGetBaseInvoiceAmountsPurchInvoiceHeaderOnAfterSetFilter(Record Purch. Inv. Header, Record Purch. Inv. Line) :#

Summary: This event is triggered when calculating the base amounts of an Invoice after the filters for the relevant Invoice Lines are set. Use this event to assign additional filters

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetBaseInvoiceAmountsPurchInvoiceHeaderOnAfterSetFilter(PurchInvHeader: Record "Purch. Inv. Header"; var PurchInvLine: Record "Purch. Inv. Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetBaseInvoiceAmountsPurchInvoiceHeaderOnAfterSetFilter', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetBaseInvoiceAmountsPurchInvoiceHeaderOnAfterSetFilter(PurchInvHeader: Record "Purch. Inv. Header"; var PurchInvLine: Record "Purch. Inv. Line")
begin
end;

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • PurchInvLine: The filtered Invoice Lines

KVSPSAREOnAfterCalcBaseAmountForDeposits(Record Purchase Header, Decimal) :#

Summary: This event is triggered after the base amount for deposits has been calculated for a Purchase Document. Use this event to modify the calculated value.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcBaseAmountForDeposits(PurchaseHeader: Record "Purchase Header"; var BaseAmount: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnAfterCalcBaseAmountForDeposits', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcBaseAmountForDeposits(PurchaseHeader: Record "Purchase Header"; var BaseAmount: Decimal)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • BaseAmount: The calculated Amount

KVSPSAREOnAfterCalcPostedPurchInvTotalBaseAmountForApportionments(Record Purch. Inv. Header, Decimal) :#

Summary: This event is triggered after the base amount for deposits has been calculated for a Purchase Document. Use this event to modify the calculated value.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcPostedPurchInvTotalBaseAmountForApportionments(PurchInvHeader: Record "Purch. Inv. Header"; var BaseAmount: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnAfterCalcPostedPurchInvTotalBaseAmountForApportionments', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcPostedPurchInvTotalBaseAmountForApportionments(PurchInvHeader: Record "Purch. Inv. Header"; var BaseAmount: Decimal)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • BaseAmount: The calculated Amount

KVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLine(Record Purchase Header, Record Purchase Line) :#

Summary: This event is triggered when the information of the order related to a Closing Invoice is read and the filters for the relevant Order Lines are set. Use this event to assign additional filters

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLine', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLine(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line")
begin
end;

Parameters:

  • PurchaseHeader: The related Order
  • PurchaseLine: The filtered Order Lines

KVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLineArchive(Record Purchase Header Archive, Record Purchase Line Archive) :#

Summary: This event is triggered when the information of the order related to a Closing Invoice is read and the filters for the relevant Order Lines are set. Use this event to assign additional filters

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLineArchive(ArchivedPurchaseHeader: Record "Purchase Header Archive"; var ArchivedPurchaseLine: Record "Purchase Line Archive"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLineArchive', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetOrderDetailsForClosingInvoiceOnAfterSetFilterPurchaseLineArchive(ArchivedPurchaseHeader: Record "Purchase Header Archive"; var ArchivedPurchaseLine: Record "Purchase Line Archive")
begin
end;

Parameters:

  • ArchivedPurchaseHeader: The related Order
  • ArchivedPurchaseLine: The filtered Order Lines

KVSPSAREOnBeforeGetPreviousPayments(Record Purchase Header, Decimal, Boolean) :#

Summary: This event is triggered before the previous payments amount of a purchase document is being calculated. Use this event to modify the calculated amount.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetPreviousPayments(PurchaseHeader: Record "Purchase Header"; var PreviousPayments: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeGetPreviousPayments', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeGetPreviousPayments(PurchaseHeader: Record "Purchase Header"; var PreviousPayments: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PreviousPayments: The calculated Amount
  • IsHandled: Set to true to skip the default calculation

KVSPSAREOnGetPreviousPaymentsAfterFinalReductions(Record Purchase Header, Decimal, Decimal, Boolean) :#

Summary: This event is triggered before the previous payments amount after final reductions of a purchase document is being calculated. Use this event to modify the calculated amount.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnGetPreviousPaymentsAfterFinalReductions(PurchaseHeader: Record "Purchase Header"; var PreviousPaymentsBeforeFinalReduction: Decimal; var PreviousPaymentsAfterFinalReduction: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnGetPreviousPaymentsAfterFinalReductions', '', false, false)]
local procedure DoSomethingKVSPSAREOnGetPreviousPaymentsAfterFinalReductions(PurchaseHeader: Record "Purchase Header"; var PreviousPaymentsBeforeFinalReduction: Decimal; var PreviousPaymentsAfterFinalReduction: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PreviousPaymentsBeforeFinalReduction: The Payment Amount before final reductions
  • PreviousPaymentsAfterFinalReduction: The calculated Amount after final reductions
  • IsHandled: Set to true to skip the default calculation

KVSPSAREOnBeforeGetPreviousPaymentsForPostedInvoice(Record Purch. Inv. Header, Decimal, Boolean) :#

Summary: This event is triggered before the previous payments amount of a purchase document is being calculated. Use this event to modify the calculated amount.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeGetPreviousPaymentsForPostedInvoice(PurchInvHeader: Record "Purch. Inv. Header"; var PreviousPayments: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeGetPreviousPaymentsForPostedInvoice', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeGetPreviousPaymentsForPostedInvoice(PurchInvHeader: Record "Purch. Inv. Header"; var PreviousPayments: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchInvHeader: The Purchase Document being calculated
  • PreviousPayments: The calculated Amount
  • IsHandled: Set to true to skip the default calculation

KVSPSAREOnAfterCalcApportionAmountForAdvInvoicePayment(Record Purch. Inv. Line, Integer, Decimal, Decimal) :#

Summary: This event is triggered after the apportionment amounts for an Advance Invoice have been calculated. Use this event to modify the calculated value.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcApportionAmountForAdvInvoicePayment(PurchInvLine: Record "Purch. Inv. Line"; CumInvoiceEntryNo: Integer; PaidAmountWithoutConsiderApportion: Decimal; var Amount: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnAfterCalcApportionAmountForAdvInvoicePayment', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcApportionAmountForAdvInvoicePayment(PurchInvLine: Record "Purch. Inv. Line"; CumInvoiceEntryNo: Integer; PaidAmountWithoutConsiderApportion: Decimal; var Amount: Decimal)
begin
end;

Parameters:

  • PurchInvLine: Specifies the apportionment invoice line
  • CumInvoiceEntryNo: Specifies the Vendor Ledger Entry No. of the Invoice
  • PaidAmountWithoutConsiderApportion: Specifies the amount before consideration of apportionments
  • Amount: The calculated amount

KVSPSAREOnBeforeCalcPaymentCorrectionMinimum(Record Purchase Header, Record Purchase Line, Record Currency, Record Vendor Ledger Entry, Decimal, Boolean, Boolean) :#

Summary: This event is triggered when the minimum Payment Correction for a Purchase Document is being calculated. Use this event to modify the calculated value.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeCalcPaymentCorrectionMinimum(PurchaseHeader: Record "Purchase Header"; PrimaryInvoiceLine: Record "Purchase Line"; Currency: Record "Currency"; var TempAdvanceVendorLedgerEntry: Record "Vendor Ledger Entry" temporary; var MinimumAmount: Decimal; var SuccesfullyCalculated: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREQuickEditPurchInvMgt", 'KVSPSAREOnBeforeCalcPaymentCorrectionMinimum', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeCalcPaymentCorrectionMinimum(PurchaseHeader: Record "Purchase Header"; PrimaryInvoiceLine: Record "Purchase Line"; Currency: Record "Currency"; var TempAdvanceVendorLedgerEntry: Record "Vendor Ledger Entry" temporary; var MinimumAmount: Decimal; var SuccesfullyCalculated: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Document being calculated
  • PrimaryInvoiceLine: The main line of the Purchase Document
  • Currency: The Currency used in the Purchase Document
  • TempAdvanceVendorLedgerEntry: The buffered advance invoices related to the Purchase Document in case it is a Closing Invoice
  • MinimumAmount: The calculated amount
  • SuccesfullyCalculated: Specifies whether the minimum could be calculated
  • IsHandled: Set to true to skip the default calculation