Skip to content

KVSPSAREDepositMgt#

Procedures#

AutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(Record Purchase Header) : Boolean#

Summary: Automatically updates the VES Deposit Lines in a Purchase Advance Invoice. This function will create/modify/delete all relevant Deposit Lines according to the VES % specified in the Order.

procedure AutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(var AdvanceInvoiceHeader: Record "Purchase Header"): Boolean

Parameters:

  • AdvanceInvoiceHeader: The Purchase Invoice to update

Returns: Specifies whether the invoice has been changed

AutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(Record KVSADVAdvanceChain, Record KVSADVAdvance Planning Entry, Record Purchase Header) : Boolean#

Summary: Automatically updates the VES Deposit Lines in a Purchase Advance Invoice. This function will create/modify/delete all relevant Deposit Lines according to the VES % specified in the Order.

procedure AutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(AdvanceChain: Record "KVSADVAdvanceChain"; var SelectedAdvPlanLine: Record "KVSADVAdvance Planning Entry"; var AdvanceInvoiceHeader: Record "Purchase Header"): Boolean

Parameters:

  • AdvanceChain: Specifies the Advance Chain related to the Purchase Advance Invoice
  • SelectedAdvPlanLine: Specifies the Advance Planning Lines related to the Purchase Advance Invoice
  • AdvanceInvoiceHeader: The Purchase Invoice to update

Returns: Specifies whether the invoice has been changed

CalcRequiredVESDepositForPurchaseDocument(Record Purchase Header) : Decimal#

Summary: Calculates the VES Deposit Amount required for this Advance Invoice according to the VES % specified by the Order and existing guarantees

procedure CalcRequiredVESDepositForPurchaseDocument(AdvanceInvoiceHeader: Record "Purchase Header"): Decimal

Parameters:

  • AdvanceInvoiceHeader: Specifies the Advance Invoice to calculate

Returns:

CalcCurrentVESDepositAmountInPurchaseDocument(Record Purchase Header) : Decimal#

Summary: Calculates the VES Deposit Amount currently contained within an Advance Invoice

procedure CalcCurrentVESDepositAmountInPurchaseDocument(PurchaseHeader: Record "Purchase Header"): Decimal

Parameters:

  • AdvanceInvoiceHeader: Specifies the Advance Invoice to calculate

Returns:

AutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(Record Purchase Header, Boolean) : Boolean#

Summary: Automatically updates the GLS Deposit Lines in a Purchase Invoice. This function will create/modify/delete all relevant Deposit Lines according to the GLS % specified in the Order.

procedure AutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(var PurchaseHeader: Record "Purchase Header"; ShowNotificationIfChanged: Boolean): Boolean

Parameters:

  • PurchaseHeader: The Purchase Invoice to update
  • ShowNotificationIfChanged: Specifies whether to show a notification in case the Deposit Lines have been updated

Returns:

CalcCurrentGLSDepositAmountInclVATInPurchaseDocument(Record Purchase Header) : Decimal#

Summary: Calculates the GLS Deposit Amount currently contained within an Invoice

procedure CalcCurrentGLSDepositAmountInclVATInPurchaseDocument(PurchaseHeader: Record "Purchase Header"): Decimal

Parameters:

  • PurchaseHeader: Specifies the Invoice to calculate

Returns:

CalcRequiredGLSDepositAmountInclVATForPurchaseDocument(Record Purchase Header, Boolean) : Decimal#

Summary: Calculates the GLS Deposit Amount required for an Invoice

procedure CalcRequiredGLSDepositAmountInclVATForPurchaseDocument(var PurchaseHeader: Record "Purchase Header"; UseFullOrderAmount: Boolean): Decimal

Parameters:

  • PurchaseHeader: Specifies the Invoice to calculate
  • UseFullOrderAmount: Specifies whether only the invoice amount itself or the complete amount of the Purchase Order should be used to calculate the GLS Deposit

Returns:

CalcDepositAmountFromGrossToNet(Record Purchase Header, Code[20], Decimal) : Decimal#

Summary: Converts a Deposit Amount calculated incl. VAT to the Amount excl. VAT

procedure CalcDepositAmountFromGrossToNet(PurchaseHeader: Record "Purchase Header"; DepositCode: Code[20]; DepositAmount: Decimal): Decimal

Parameters:

  • PurchaseHeader: The Purchase Header for which the Deposit Amount has been calculated
  • DepositCode: The Code of the calculated Deposit
  • DepositAmount: Amount incl. VAT

Returns: Amount excl. VAT

FillDepositPurchaseLineJobReferenceAndVATProdPostGroupByExistingPurchaseLines(Record Purchase Line) :#

Summary: Updates the Job Reference (Job No., WBS Code + PTS fields) and the VAT Prod. Posting Group to a newly created Deposit Line

procedure FillDepositPurchaseLineJobReferenceAndVATProdPostGroupByExistingPurchaseLines(var DepositPurchaseLine: Record "Purchase Line"): 

Parameters:

  • DepositPurchaseLine: The Deposit Line to be updated

ShowDeposits(Notification) :#

Summary: Shows a list of posted Deposit Invoices by a Notification

procedure ShowDeposits(Notification: Notification): 

Parameters:

  • Notification: The Notification containing the Invoice No

CancelDeposits(Notification) :#

Summary: Cancels a list of posted Deposit Invoices by a Notification

procedure CancelDeposits(Notification: Notification): 

Parameters:

  • Notification: The Notification containing the Invoice No

ForceRecalculateApportionmentsAndDepositsForPurchHeader(Record Purchase Header) :#

Summary: Recalculates all Deposits and Apportionments within a Purchase Document

procedure ForceRecalculateApportionmentsAndDepositsForPurchHeader(var PurchaseHeader: Record "Purchase Header"): 

Parameters:

  • PurchaseHeader: The Purchase Document to recalculate

Events#

KVSPSAREOnBeforeSaveDepositAdvanceChain(Record KVSADVAdvancePlanDeposit, Record KVSADVAdvanceChain) :#

Summary: This event is triggered before Deposits are saved in an Advance Chain. Use this event to modify the Deposits beforehand.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeSaveDepositAdvanceChain(var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; AdvanceChain: Record "KVSADVAdvanceChain"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeSaveDepositAdvanceChain', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeSaveDepositAdvanceChain(var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; AdvanceChain: Record "KVSADVAdvanceChain")
begin
end;

Parameters:

  • TempAdvanceDepositBuffer: The Deposits which will be saved for the Advance Chain
  • AdvanceChain: The Advance Chain being updated

KVSPSAREOnAfterSaveDepositAdvanceChain(Record KVSADVAdvancePlanDeposit, Record KVSADVAdvanceChain, Record KVSPSAREAdvanceChainDeposit) :#

Summary: This event is triggered after Deposits have been saved in an Advance Chain. Use this event to make additional data changes and such.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterSaveDepositAdvanceChain(var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; AdvanceChain: Record "KVSADVAdvanceChain"; AdvanceChainDeposit: Record "KVSPSAREAdvanceChainDeposit"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterSaveDepositAdvanceChain', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterSaveDepositAdvanceChain(var TempAdvanceDepositBuffer: Record "KVSADVAdvancePlanDeposit" temporary; AdvanceChain: Record "KVSADVAdvanceChain"; AdvanceChainDeposit: Record "KVSPSAREAdvanceChainDeposit")
begin
end;

Parameters:

  • TempAdvanceDepositBuffer: The Deposits which have been saved for the Advance Chain
  • AdvanceChain: The Advance Chain being updated

KVSPSAREOnBeforeUpdateExistingAdvancePlanLines(Record KVSADVAdvanceChain, Boolean) :#

Summary: This event is triggered before Deposits added to an Advance Chain are automatically transferred to existing Advance Planning Lines. Use this event to deactivate this functionality or make addiional preparations.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeUpdateExistingAdvancePlanLines(var AdvanceChain: Record "KVSADVAdvanceChain"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeUpdateExistingAdvancePlanLines', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeUpdateExistingAdvancePlanLines(var AdvanceChain: Record "KVSADVAdvanceChain"; var IsHandled: Boolean)
begin
end;

Parameters:

  • AdvanceChain: The Advance Chain being updated
  • IsHandled: If set to true the Advance Planning Lines wil not be updated

KVSPSAREOnAfterTransferAdvanceChainDepositToAdvancePlanDepositBeforeModify(Record KVSADVAdvance Planning Entry, Record KVSPSAREAdvanceChainDeposit, Record KVSADVAdvancePlanDeposit) :#

Summary: This event is triggered when Deposits added to an Advance Chain are automatically transferred to existing Advance Planning Lines. Use this event to transfer additional data from the Advance Chain Deposits to the Advance Planning Line Deposits.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterTransferAdvanceChainDepositToAdvancePlanDepositBeforeModify(var AdvancePlanningEntry: Record "KVSADVAdvance Planning Entry"; var AdvanceChainDeposit: Record "KVSPSAREAdvanceChainDeposit"; var AdvancePlanDeposit: Record "KVSADVAdvancePlanDeposit"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterTransferAdvanceChainDepositToAdvancePlanDepositBeforeModify', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterTransferAdvanceChainDepositToAdvancePlanDepositBeforeModify(var AdvancePlanningEntry: Record "KVSADVAdvance Planning Entry"; var AdvanceChainDeposit: Record "KVSPSAREAdvanceChainDeposit"; var AdvancePlanDeposit: Record "KVSADVAdvancePlanDeposit")
begin
end;

Parameters:

  • AdvancePlanningEntry: The Advance Planning Line being updated
  • AdvanceChainDeposit: The Advance Chain Deposit triggering the update
  • AdvancePlanDeposit: The updated Advance Plan Deposit

KVSPSAREOnBeforeUpdateAdvancePlanDepositsByAdvanceChainDeposits(Integer, Boolean) :#

Summary: This event is triggered before Deposits added to an Advance Chain are automatically transferred to existing Advance Planning Lines. Use this event to deactivate this functionality or make addiional preparations.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeUpdateAdvancePlanDepositsByAdvanceChainDeposits(AdvanceChainNo: Integer; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeUpdateAdvancePlanDepositsByAdvanceChainDeposits', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeUpdateAdvancePlanDepositsByAdvanceChainDeposits(AdvanceChainNo: Integer; var IsHandled: Boolean)
begin
end;

Parameters:

  • AdvanceChainNo: The Advance Chain which will be updated
  • IsHandled: If set to true the Advance Planning Lines wil not be updated

KVSPSAREOnBeforeAutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(Record Purchase Header, Record KVSADVAdvanceChain, Record KVSADVAdvance Planning Entry, Boolean, Boolean) :#

Summary: This event is triggered before the VES Deposits in an Advance Invoice are recalculated and updated. Use this event to deactivate this functionality or make additional preparations

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeAutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(var AdvanceInvoiceHeader: Record "Purchase Header"; AdvanceChain: Record "KVSADVAdvanceChain"; var SelectedAdvPlanLine: Record "KVSADVAdvance Planning Entry"; var Updated: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeAutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeAutoUpsertVESDepositsAdvanceToPurchaseAdvanceInvoice(var AdvanceInvoiceHeader: Record "Purchase Header"; AdvanceChain: Record "KVSADVAdvanceChain"; var SelectedAdvPlanLine: Record "KVSADVAdvance Planning Entry"; var Updated: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • AdvanceInvoiceHeader: The Advance Invoice being updated
  • AdvanceChain: The Advance Chain of the Invoice
  • SelectedAdvPlanLine: The Advance Planning Lines related to the Invoice
  • Updated: Will be set to true if an VES Deposit has been changed by this function
  • IsHandled: If set to true the VES Deposits will not be updated

KVSPSAREOnAfterCalcRequiredVESDepositForPurchaseDocument(Record Purchase Header, Decimal) :#

Summary: This event is triggered after the required VES Deposit Amount for an Invoice has been calculated. Use this event to modify the calculated Amount.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcRequiredVESDepositForPurchaseDocument(AdvanceInvoiceHeader: Record "Purchase Header"; var DepositAmount: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterCalcRequiredVESDepositForPurchaseDocument', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcRequiredVESDepositForPurchaseDocument(AdvanceInvoiceHeader: Record "Purchase Header"; var DepositAmount: Decimal)
begin
end;

Parameters:

  • AdvanceInvoiceHeader: The Invoice being calculated
  • DepositAmount: The resulting Amount

KVSPSAREOnAfterCalcGuaranteeAndDepositAmountForPurchaseOrder(Code[20], Code[20], Code[20], Integer, Boolean, Boolean, Decimal, Decimal) :#

Summary: This event is triggered after the Guarantee and Deposit Amounts have been calculated based on a Purchase Order. Use this event to modify these Amounts.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcGuaranteeAndDepositAmountForPurchaseOrder(GuaranteeType: Code[20]; DepositCode: Code[20]; OrderNo: Code[20]; AdvanceChainNo: Integer; CalcDepositsWithoutAdvanceChainRelation: Boolean; ConsiderAutomaticCancellations: Boolean; var GuaranteeAmount: Decimal; var DepositAmount: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterCalcGuaranteeAndDepositAmountForPurchaseOrder', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcGuaranteeAndDepositAmountForPurchaseOrder(GuaranteeType: Code[20]; DepositCode: Code[20]; OrderNo: Code[20]; AdvanceChainNo: Integer; CalcDepositsWithoutAdvanceChainRelation: Boolean; ConsiderAutomaticCancellations: Boolean; var GuaranteeAmount: Decimal; var DepositAmount: Decimal)
begin
end;

Parameters:

  • GuaranteeType: The Guarantee Type being considered for the calculation of Guarantee Amounts
  • DepositCode: The Deposit Code being considered for the calculation of Deposit Amounts
  • OrderNo: The No. of the Order being calculated
  • AdvanceChainNo: The Advance Chain related to the Order
  • CalcDepositsWithoutAdvanceChainRelation: By default only Advance Invoices related to the Advance Chain will be considered regarding posted Amounts. Set this flag to true to consider any Inovice related to the Purchase Order
  • ConsiderAutomaticCancellations: Specifies whether Advance Invoices which will be according cancelled with the next Advance Invoice will be already considered as cancelled
  • GuaranteeAmount: The resulting Guarantee Amount
  • DepositAmount: The resulting Deposit Amount

KVSPSAREOnBeforeForbidDirectOrderPostingIfGLSDepositsExist(Record Purchase Header, Boolean) :#

Summary: A Purchase Order containing GLS Deposits can by default not be posted directly. Instead an Invoice has to be created to post the Order. The reason for this being the GLS Deposit which would not be fully considered by a direct posting of the Order. This event is triggered immediately before the check. Use this event to prevent the check.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeForbidDirectOrderPostingIfGLSDepositsExist(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeForbidDirectOrderPostingIfGLSDepositsExist', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeForbidDirectOrderPostingIfGLSDepositsExist(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchHeader: The Purchase Order being checked
  • IsHandled: Set to true to allow direct posting of the Order

KVSPSAREOnBeforeAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(Record Purchase Header, Boolean, Boolean, Boolean) :#

Summary: This event is triggered before the GLS Deposit Lines in a Purchase Invoice are updated. Use this event to deactivate this functionality or make additional preparations.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(var PurchaseHeader: Record "Purchase Header"; ShowNotificationIfChanged: Boolean; var Updated: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(var PurchaseHeader: Record "Purchase Header"; ShowNotificationIfChanged: Boolean; var Updated: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Invoice being updated
  • ShowNotificationIfChanged: If set to true a notification will be shown if the GLS Deposit is updated by this function
  • Updated: Will be set to true if the GLS Deposit has been updated
  • IsHandled: If set to true the GLS Deposit will not be updated

KVSPSAREOnAfterAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(Record Purchase Header, Boolean) :#

Summary: This event is triggered after the GLS Deposit Lines in a Purchase Invoice are updated. Use this event to make additional changes and such.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(var PurchaseHeader: Record "Purchase Header"; ShowNotificationIfChanged: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterAutoUpsertGuaranteeDepositsGLSToPurchaseClosingInvoice(var PurchaseHeader: Record "Purchase Header"; ShowNotificationIfChanged: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Invoice being updated
  • ShowNotificationIfChanged: If set to true a notification will be shown if the GLS Deposit is updated by this function

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

Summary: This event is triggered after the required GLS Deposit Amount for a Purchase Invoice has been calculated. Use this event to modify the calculated Amount.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcRequiredGLSDepositAmountInclVATForPurchaseDocument(var PurchaseHeader: Record "Purchase Header"; UseFullOrderAmount: Boolean; var DepositAmount: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterCalcRequiredGLSDepositAmountInclVATForPurchaseDocument', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcRequiredGLSDepositAmountInclVATForPurchaseDocument(var PurchaseHeader: Record "Purchase Header"; UseFullOrderAmount: Boolean; var DepositAmount: Decimal)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Invoice being calculated
  • UseFullOrderAmount: Specifies whether only the invoice amount itself or the complete amount of the Purchase Order should be used to calculate the GLS Deposit
  • DepositAmount: The resulting Amount

KVSPSAREOnAfterFillDepositPurchaseLineJobReferenceAndVATProdPostGroupByExistingPurchaseLinesBeforeModify(Record Purchase Line) :#

Summary: This event is triggered after the Job Reference (Job No., WBS Code + PTS fields) and the VAT Prod. Posting Group have been assigned to a newly created Deposit Line. Use this event to make additional changes to the Deposit Line.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterFillDepositPurchaseLineJobReferenceAndVATProdPostGroupByExistingPurchaseLinesBeforeModify(var DepositPurchaseLine: Record "Purchase Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterFillDepositPurchaseLineJobReferenceAndVATProdPostGroupByExistingPurchaseLinesBeforeModify', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterFillDepositPurchaseLineJobReferenceAndVATProdPostGroupByExistingPurchaseLinesBeforeModify(var DepositPurchaseLine: Record "Purchase Line")
begin
end;

Parameters:

  • DepositPurchaseLine: The updated Deposit Line

KVSPSAREOnAfterCalcPreviouslyPostedOrderAmountsForAutoAddGuaranteeDeposits(Code[20], Code[20], Decimal) :#

Summary: This event is triggered after the previously posted Amounts for a specfic Deposit have been calculated for a Purchase Order. Use this event to modify the calculated Amounts.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnAfterCalcPreviouslyPostedOrderAmountsForAutoAddGuaranteeDeposits(OrderNo: Code[20]; CalcForDepositCode: Code[20]; var Result: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnAfterCalcPreviouslyPostedOrderAmountsForAutoAddGuaranteeDeposits', '', false, false)]
local procedure DoSomethingKVSPSAREOnAfterCalcPreviouslyPostedOrderAmountsForAutoAddGuaranteeDeposits(OrderNo: Code[20]; CalcForDepositCode: Code[20]; var Result: Decimal)
begin
end;

Parameters:

  • OrderNo: The Order being calculated
  • CalcForDepositCode: The Deposit Code being calculated
  • Result: The resulting amount calculated

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

Summary: This event is triggered before the remaining factor of a posted Purchase Invoice not applied by Credit Memos is calculated. Use this Event to replace the default calculation and implement an own one.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeCalcNonCreditMemoedFactorForPurchInvHeader(PurchInvHeader: Record "Purch. Inv. Header"; var Factor: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeCalcNonCreditMemoedFactorForPurchInvHeader', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeCalcNonCreditMemoedFactorForPurchInvHeader(PurchInvHeader: Record "Purch. Inv. Header"; var Factor: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchInvHeader: The Purchase Invoice being calculated
  • Factor: The resulting factor as a decimal between 0 and 1
  • IsHandled: Set to true to deactivate the default calculation.

KVSPSAREOnBeforeCheckAdvanceAmountNotHigherThanOfOrderWithGLSDeposit(Record Purchase Header, Boolean) :#

Summary: This event is triggered before an Advance Invoice Amount is checked to not surpass the corresponding Order's Amount after GLS Deposits. Use this event to deactivate this check.

[IntegrationEvent(false, false)]
local procedure KVSPSAREOnBeforeCheckAdvanceAmountNotHigherThanOfOrderWithGLSDeposit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSPSAREDepositMgt", 'KVSPSAREOnBeforeCheckAdvanceAmountNotHigherThanOfOrderWithGLSDeposit', '', false, false)]
local procedure DoSomethingKVSPSAREOnBeforeCheckAdvanceAmountNotHigherThanOfOrderWithGLSDeposit(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)
begin
end;

Parameters:

  • PurchaseHeader: The Purchase Invoice being checked
  • IsHandled: Set to true to deactivate the check