Skip to content

KVSKBAPurchasePriceLib#

Procedures#

AddPricesListLineHierachy(Codeunit Price Source List, Code[20]) :#

procedure AddPricesListLineHierachy(var PriceSourceList: Codeunit "Price Source List"; VendorNo: Code[20]): 

CopyPurchCondLinesLDiscPriceListLine(Record Price List Line, Record KVSKBAPurchaseConditionLine, Code[20], Decimal, Record Currency, Decimal, Date, Code[10], Decimal) :#

Summary: Copies the purchase condition lines for discount line conditions from a price list line to a purchase condition line, calculating the necessary values based on the provided parameters.

procedure CopyPurchCondLinesLDiscPriceListLine(var FromPriceListLine: Record "Price List Line"; var ToPurchaseConditionLine: Record "KVSKBAPurchaseConditionLine"; ItemNo: Code[20]; InitialPrice: Decimal; Currency: Record "Currency"; CurrencyFactor: Decimal; DocumentDate: Date; UOMCode: Code[10]; QtyPerUOM: Decimal): 

Parameters:

  • FromPriceListLine: The price list line from which to copy the purchase condition lines.
  • ToPurchaseConditionLine: The purchase condition line to which the purchase condition lines will be copied.
  • ItemNo: The item number for which the purchase condition lines are copied.
  • InitialPrice: The initial price to be used in the purchase condition lines.
  • Currency: The currency record used for the purchase condition lines.
  • CurrencyFactor: The currency factor for the purchase condition lines.
  • DocumentDate: The document date for the purchase condition lines.
  • UOMCode: The unit of measure code for the purchase condition lines.
  • QtyPerUOM: The quantity per unit of measure for the purchase condition lines.

Remarks: This procedure copies the purchase condition lines from a price list line to a purchase condition line. It calculates the necessary fields and sets the reference number for the purchase condition line. It also ensures that the purchase condition line is properly initialized and that the initial price is calculated based on the provided parameters. The procedure will raise an error if the price list line does not have a valid discount condition number.

ShowPurchPriceDiscCalcLines(Record Purchase Line, Option) :#

Summary: Displays the purchase price discount calculation lines for a given purchase line.

procedure ShowPurchPriceDiscCalcLines(var PurchaseLine: Record "Purchase Line"; LineType: Option): 

Parameters:

  • PurchaseLine: The purchase line record for which the calculation lines are displayed.
  • LineType: The type of line for which the calculation lines are displayed (either Price or Line Discount).

Remarks: This procedure opens the purchase price discount calculation page for the specified purchase line and line type. It retrieves the calculation lines from the temporary record and updates the purchase line with the calculated values for the direct unit cost or line discount percentage based on the line type. If the user confirms the calculation, the procedure updates the purchase line with the new values and deletes any existing calculation lines for that purchase line.

DeletePurchPriceDiscCalcTab38(Record Purchase Header) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: Deletes all purchase price discount calculation lines associated with the specified purchase header.

[Obsolete('This procedure is no longer supported, please use DeletePurchPriceDiscCalcLinefromPurchaseHeader', '26.5')]
procedure DeletePurchPriceDiscCalcTab38(PurchaseHeader: Record "Purchase Header"): 

Parameters:

  • PurchaseHeader: The purchase header record from which to delete the calculation lines.

Remarks: This procedure deletes all purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) that are associated with the specified purchase header. It resets the record, sets the necessary filters based on the document type and number, and then deletes all matching lines. The document line number is set to 0 to delete all lines related to the purchase header. This procedure is obsolete and will be removed in a future version. Please use DeletePurchPriceDiscCalcLinefromPurchaseHeader instead.

DeletePurchPriceDiscCalcLinefromPurchaseHeader(Record Purchase Header) :#

Summary: Deletes all purchase price discount calculation lines associated with the specified purchase header.

procedure DeletePurchPriceDiscCalcLinefromPurchaseHeader(PurchaseHeader: Record "Purchase Header"): 

Parameters:

  • PurchaseHeader: The purchase header record from which to delete the calculation lines.

Remarks: This procedure deletes all purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) that are associated with the specified purchase header. It resets the record, sets the necessary filters based on the document type and number, and then deletes all matching lines. The document line number is set to 0 to delete all lines related to the purchase header.

DeletePurchPriceDiscCalcTab39(Record Purchase Line, Option, Boolean, Decimal, Boolean) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: Deletes purchase price discount calculation lines from a purchase line based on the specified parameters.

[Obsolete('This procedure is no longer supported, please use DeletePurchPriceDiscCalcLinefromPurchaseLine', '26.5')]
procedure DeletePurchPriceDiscCalcTab39(PurchaseLine: Record "Purchase Line"; LineType: Option; Unconditional: Boolean; ComparativeValue: Decimal; HideConfirm: Boolean): 

Parameters:

  • PurchaseLine: The purchase line record from which to delete the calculation lines.
  • LineType: The type of line to delete (Price or Line Discount).
  • Unconditional: Indicates whether the deletion is unconditional.
  • ComparativeValue: The value to compare against the existing calculation line values.
  • HideConfirm: Indicates whether to hide the confirmation dialog. If false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value.

Remarks: This procedure deletes purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) from a specified purchase line. It checks if the line type matches the specified type (Price or Line Discount) and compares the existing values with the provided comparative value. If the values differ, it prompts the user for confirmation unless HideConfirm is set to true. If the user confirms or if Unconditional is true, it deletes the calculation lines. This procedure is obsolete and will be removed in a future version. Please use DeletePurchPriceDiscCalcLinefromPurchaseLine instead.

DeletePurchPriceDiscCalcLinefromPurchaseLine(Record Purchase Line, Option, Boolean, Decimal, Boolean) :#

Summary: Deletes purchase price discount calculation lines from a purchase line based on the specified parameters.

procedure DeletePurchPriceDiscCalcLinefromPurchaseLine(PurchaseLine: Record "Purchase Line"; LineType: Option; Unconditional: Boolean; ComparativeValue: Decimal; HideConfirm: Boolean): 

Parameters:

  • PurchaseLine: The purchase line record from which to delete the calculation lines.
  • LineType: The type of line to delete (Price or Line Discount).
  • Unconditional: Indicates whether the deletion is unconditional.
  • ComparativeValue: The value to compare against the existing calculation line values.
  • HideConfirm: Indicates whether to hide the confirmation dialog. If false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value.

Remarks: This procedure deletes purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) from a specified purchase line. It checks if the line type matches the specified type (Price or Line Discount) and compares the existing values with the provided comparative value. If the values differ, it prompts the user for confirmation unless HideConfirm is set to true. If the user confirms or if Unconditional is true, it deletes the calculation lines.

CopyPurchPriceDiscTab39Tab39(Record Purchase Line, Record Purchase Line) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: Copies the purchase price discount calculation lines from one purchase line to another.

[Obsolete('This procedure is no longer supported, please use CopyPurchPriceDiscCalcLinefromPurchaseLinetoPurchaseLine', '26.5')]
procedure CopyPurchPriceDiscTab39Tab39(FromPurchaseLine: Record "Purchase Line"; ToPurchaseLine: Record "Purchase Line"): 

Parameters:

  • FromPurchaseLine: The source purchase line from which to copy the calculation lines.
  • ToPurchaseLine: The target purchase line to which the calculation lines will be copied.

Remarks: This procedure copies all purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) from the specified source purchase line to the target purchase line. It resets the source record, sets the necessary filters based on the document type, number, and line number, and then copies each line to the target purchase line. The document type, number, and line number of the target purchase line are updated accordingly. This procedure is obsolete and will be removed in a future version. Please use CopyPurchPriceDiscCalcLinefromPurchaseLinetoPurchaseLine instead.

CopyPurchPriceDiscCalcLinefromPurchaseLinetoPurchaseLine(Record Purchase Line, Record Purchase Line) :#

Summary: Copies the purchase price discount calculation lines from one purchase line to another.

procedure CopyPurchPriceDiscCalcLinefromPurchaseLinetoPurchaseLine(FromPurchaseLine: Record "Purchase Line"; ToPurchaseLine: Record "Purchase Line"): 

Parameters:

  • FromPurchaseLine: The source purchase line from which to copy the calculation lines.
  • ToPurchaseLine: The target purchase line to which the calculation lines will be copied.

Remarks: This procedure copies all purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) from the specified source purchase line to the target purchase line. It resets the source record, sets the necessary filters based on the document type, number, and line number, and then copies each line to the target purchase line. The document type, number, and line number of the target purchase line are updated accordingly.

CopyPurchPriceDiscTab5110Tab39(Record Purchase Line Archive, Record Purchase Line) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: Copies purchase price discount calculation lines from a purchase line archive to a purchase line.

[Obsolete('This procedure is no longer supported, please use CopyPurchPriceDiscCalcLinefromPurchaseLineArchivetoPurchaseLine', '26.5')]
procedure CopyPurchPriceDiscTab5110Tab39(PurchaseLineArchiv: Record "Purchase Line Archive"; PurchaseLine: Record "Purchase Line"): 

Parameters:

  • PurchaseLineArchiv: The purchase line archive record from which to copy the calculation lines.
  • PurchaseLine: The target purchase line to which the calculation lines will be copied.

Remarks: This procedure copies all purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) from the specified purchase line archive to the target purchase line. It resets the archive record, sets the necessary filters based on the document type, number, occurrence, version number, and line number, and then copies each line to the target purchase line. The document type, number, and line number of the target purchase line are updated accordingly. This procedure is obsolete and will be removed in a future version. Please use CopyPurchPriceDiscCalcLinefromPurchaseLineArchivetoPurchaseLine instead.

CopyPurchPriceDiscCalcLinefromPurchaseLineArchivetoPurchaseLine(Record Purchase Line Archive, Record Purchase Line) :#

Summary: Copies purchase price discount calculation lines from a purchase line archive to a purchase line.

procedure CopyPurchPriceDiscCalcLinefromPurchaseLineArchivetoPurchaseLine(PurchaseLineArchiv: Record "Purchase Line Archive"; PurchaseLine: Record "Purchase Line"): 

Parameters:

  • PurchaseLineArchiv: The purchase line archive record from which to copy the calculation lines.
  • PurchaseLine: The target purchase line to which the calculation lines will be copied.

Remarks: This procedure copies all purchase price discount calculation lines (KVSKBAPurchPriceDiscCalcLine) from the specified purchase line archive to the target purchase line. It resets the archive record, sets the necessary filters based on the document type, number, occurrence, version number, and line number, and then copies each line to the target purchase line. The document type, number, and line number of the target purchase line are updated accordingly.

NewCalcDUCostLDiscPurchLines(Record Purchase Line) :#

Summary: the function starts a new calculation of "Direct Unit Cost" and "Line Discount %" of the filtered purchase lines

procedure NewCalcDUCostLDiscPurchLines(var PurchaseLine: Record "Purchase Line"): 

Parameters:

  • PurchaseLine: filtered purchase lines

Remarks: This function is used in the purchase line. It is used to recalculate the fields "Direct Unit Cost" and "Line Discount %" of the purchase lines, which are filtered by the passed PurchaseLine parameter.

CheckExtendedPriceCalcEnabled() : Boolean#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: Checks if the extended price calculation is enabled.

[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
procedure CheckExtendedPriceCalcEnabled(): Boolean

Returns: Returns true if the extended price calculation is enabled, otherwise false.

Remarks: This procedure is only used for old Pricing Engine and is marked as obsolete. This procedure checks the "Purchases & Payables Setup" to determine if the extended price calculation is enabled. It uses the "KVSKBAExtendedPriceCalculation" field to check if the value is set to "Ext. Price Calculation". If the setup is not found, it defaults to false.

SetCalcDate(Date) :#

Summary: Sets the calculation date for discount calculations.

procedure SetCalcDate(NewDate: Date): 

Parameters:

  • NewDate: The new calculation date to set.

Remarks: This procedure sets the calculation date for discount calculations. If the new date is 0D (default), it uses the current work date. The calculation date is used to determine the effective date for discounts.

GetCalcDate() : Date#

Summary: Gets the current calculation date for discount calculations.

procedure GetCalcDate(): Date

Returns: Returns the current calculation date.

Remarks: This procedure retrieves the current calculation date for discount calculations. If the calculation date is not set (0D), it returns the current work date. The calculation date is used to determine the effective date for discounts.

Events#

OnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader(Record KVSKBAPurchaseConditionHeader, Record KVSKBAPurchasePrice) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: This event is triggered before setting the filter for the purchase condition header when looking up purchase price conditions. This event is marked as obsolete and will be removed in a future version, please use OnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader.

[Obsolete('This event is no longer supported, please use OnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader', '26.5')]
[IntegrationEvent(false, false)]
local procedure OnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader(PurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; var PurchasePrice: Record "KVSKBAPurchasePrice"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader', '', false, false)]
local procedure DoSomethingOnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader(PurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; var PurchasePrice: Record "KVSKBAPurchasePrice")
begin
end;

Parameters:

  • PurchaseConditionHeader: The purchase condition header record.
  • PurchasePrice: The purchase price record.

Remarks: This event allows subscribers to modify the filter criteria for the purchase condition header. If the filter is modified, it can affect the results returned when looking up purchase price conditions. This event is marked as obsolete and will be removed in a future version.

OnLookupPurchCondNoInPurchPriceOnAfterSetFilterPurchaseConditionHeader(Record KVSKBAPurchaseConditionHeader, Record KVSKBAPurchasePrice) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: This event is triggered before setting the filter for the purchase condition header when looking up purchase price conditions.

[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnLookupPurchCondNoInPurchPriceOnAfterSetFilterPurchaseConditionHeader(var PurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; PurchasePrice: Record "KVSKBAPurchasePrice"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnLookupPurchCondNoInPurchPriceOnAfterSetFilterPurchaseConditionHeader', '', false, false)]
local procedure DoSomethingOnLookupPurchCondNoInPurchPriceOnAfterSetFilterPurchaseConditionHeader(var PurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; PurchasePrice: Record "KVSKBAPurchasePrice")
begin
end;

Parameters:

  • PurchaseConditionHeader: The purchase condition header record.
  • PurchasePrice: The purchase price record.

Remarks: This event allows subscribers to modify the filter criteria for the purchase condition header. If the filter is modified, it can affect the results returned when looking up purchase price conditions. This event is marked as obsolete and will be removed in a future version.

OnLookupPurchPriceCondNoInPricePriceListOnSetFilterPurchCondHeader(Record KVSKBAPurchaseConditionHeader, Record Price List Line) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: This event is triggered before setting the filter for the purchase condition header when looking up purchase price conditions. This event is marked as obsolete and will be removed in a future version, please use OnLookupPurchPriceCondNoInPricePriceListOnAfterSetFilterPurchaseConditionHeader.

[Obsolete('This event is no longer supported, please use OnLookupPurchCondNoInPurchPriceOnSetFilterPurchCondHeader', '26.5')]
[IntegrationEvent(false, false)]
local procedure OnLookupPurchPriceCondNoInPricePriceListOnSetFilterPurchCondHeader(KVSKBAPurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; var PriceListLine: Record "Price List Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnLookupPurchPriceCondNoInPricePriceListOnSetFilterPurchCondHeader', '', false, false)]
local procedure DoSomethingOnLookupPurchPriceCondNoInPricePriceListOnSetFilterPurchCondHeader(KVSKBAPurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; var PriceListLine: Record "Price List Line")
begin
end;

Parameters:

  • KVSKBAPurchaseConditionHeader: The purchase condition header record.
  • PriceListLine: The price list line record.

Remarks: This event allows subscribers to modify the filter criteria for the purchase condition header. If the filter is modified, it can affect the results returned when looking up purchase price conditions. This event is marked as obsolete and will be removed in a future version.

OnLookupPurchPriceCondNoInPricePriceListOnAfterSetFilterPurchaseConditionHeader(Record KVSKBAPurchaseConditionHeader, Record Price List Line) :#

Summary: This event is triggered before setting the filter for the purchase condition header when looking up purchase price conditions.

[IntegrationEvent(false, false)]
local procedure OnLookupPurchPriceCondNoInPricePriceListOnAfterSetFilterPurchaseConditionHeader(var PurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; PriceListLine: Record "Price List Line"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnLookupPurchPriceCondNoInPricePriceListOnAfterSetFilterPurchaseConditionHeader', '', false, false)]
local procedure DoSomethingOnLookupPurchPriceCondNoInPricePriceListOnAfterSetFilterPurchaseConditionHeader(var PurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; PriceListLine: Record "Price List Line")
begin
end;

Parameters:

  • PurchaseConditionHeader: The purchase condition header record.
  • PriceListLine: The price list line record.

Remarks: This event allows subscribers to modify the filter criteria for the purchase condition header. If the filter is modified, it can affect the results returned when looking up purchase price conditions.

OnCalcPurchCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculationwithIsHandled(Record KVSKBAPurchaseConditionHeader, Record Price List Line, Boolean) :#

Summary: This event is triggered before checking if the base of calculation is allowed for the purchase condition in the price list line.

[IntegrationEvent(false, false)]
local procedure OnCalcPurchCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculationwithIsHandled(KVSKBAPurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; var PriceListLine: Record "Price List Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnCalcPurchCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculationwithIsHandled', '', false, false)]
local procedure DoSomethingOnCalcPurchCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculationwithIsHandled(KVSKBAPurchaseConditionHeader: Record "KVSKBAPurchaseConditionHeader"; var PriceListLine: Record "Price List Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • KVSKBAPurchaseConditionHeader: The purchase condition header record.
  • PriceListLine: The price list line record.
  • IsHandled: Indicates if the event has been handled.

Remarks: This event allows subscribers to modify the behavior of the base of calculation check. If IsHandled is set to true, the default behavior of checking the base of calculation will be skipped.

OnShowPurchPriceDiscCalcLinesOnBeforeCaseLineType(Record Purchase Line, Option, Record KVSKBAPurchPriceDiscCalcLine, Record KVSKBAPurchPriceDiscCalcLine) :#

Summary: This event is triggered before at saving the direct unit cost or line discount to the purchase line and before set the KVSKBAPriceOrigin.

[IntegrationEvent(false, false)]
local procedure OnShowPurchPriceDiscCalcLinesOnBeforeCaseLineType(var PurchaseLine: Record "Purchase Line"; LineType: Option; PurchPriceDiscCalcLine: Record "KVSKBAPurchPriceDiscCalcLine"; var TempPurchPriceDiscCalcLine: Record "KVSKBAPurchPriceDiscCalcLine" temporary): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnShowPurchPriceDiscCalcLinesOnBeforeCaseLineType', '', false, false)]
local procedure DoSomethingOnShowPurchPriceDiscCalcLinesOnBeforeCaseLineType(var PurchaseLine: Record "Purchase Line"; LineType: Option; PurchPriceDiscCalcLine: Record "KVSKBAPurchPriceDiscCalcLine"; var TempPurchPriceDiscCalcLine: Record "KVSKBAPurchPriceDiscCalcLine" temporary)
begin
end;

Parameters:

  • PurchaseLine: The purchase line for which the calculation lines will be shown.
  • LineType: The type of line (Price or Line Discount).
  • PurchPriceDiscCalcLine: The purchase price discount calculation line record.
  • TempPurchPriceDiscCalcLine: Temporary record for purchase price discount calculation lines.

Remarks: This event allows subscribers to modify purchase line at at saving the direct unit cost or line discount before set the KVSKBAPriceOrigin.

OnBeforeCheckExtendedPriceCalcEnabled(Boolean, Boolean) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: This event is triggered before checking if the extended price calculation is enabled.

[Obsolete('The price calculation needs a redesign due to the standard changes, possibly the function will not be available in the future.', '18.3')]
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckExtendedPriceCalcEnabled(var ExtendedPriceCalcEnabled: Boolean; var Handled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnBeforeCheckExtendedPriceCalcEnabled', '', false, false)]
local procedure DoSomethingOnBeforeCheckExtendedPriceCalcEnabled(var ExtendedPriceCalcEnabled: Boolean; var Handled: Boolean)
begin
end;

Parameters:

  • ExtendedPriceCalcEnabled: The variable that indicates if the extended price calculation is enabled.
  • Handled: Indicates if the event has been handled.

Remarks: This event allows subscribers to modify the value of ExtendedPriceCalcEnabled before the check is performed. If Handled is set to true, the default behavior of checking the setup will be skipped. This event is marked as obsolete and will be removed in a future version.

OnBeforeDeletePurchPriceDiscCalcTab39(Record Purchase Line, Boolean) :#

Obsolete

This Element will be removed or changed with a future Version of the App.

Summary: This event is triggered before deleting purchase price discount calculation lines from a purchase line.

[Obsolete('This event is no longer supported, please use OnBeforeDeletePurchPriceDiscCalcLinefromPurchaseLine', '26.5')]
[IntegrationEvent(false, false)]
local procedure OnBeforeDeletePurchPriceDiscCalcTab39(PurchaseLine: Record "Purchase Line"; var Unconditional: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnBeforeDeletePurchPriceDiscCalcTab39', '', false, false)]
local procedure DoSomethingOnBeforeDeletePurchPriceDiscCalcTab39(PurchaseLine: Record "Purchase Line"; var Unconditional: Boolean)
begin
end;

Parameters:

  • PurchaseLine: The purchase line from which the calculation lines will be deleted.
  • Unconditional: Indicates if the deletion should be unconditional.

Remarks: This event allows subscribers to modify the behavior of the deletion process. If Unconditional is set to true, the deletion will proceed without any conditions. If Unconditional is set to false, the deletion may be conditional based on business logic. This event is marked as obsolete and will be removed in a future version.

OnBeforeDeletePurchPriceDiscCalcLinefromPurchaseLine(Record Purchase Line, Boolean) :#

Summary: This event is triggered before deleting purchase price discount calculation lines from a purchase line.

[IntegrationEvent(false, false)]
local procedure OnBeforeDeletePurchPriceDiscCalcLinefromPurchaseLine(PurchaseLine: Record "Purchase Line"; var Unconditional: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAPurchasePriceLib", 'OnBeforeDeletePurchPriceDiscCalcLinefromPurchaseLine', '', false, false)]
local procedure DoSomethingOnBeforeDeletePurchPriceDiscCalcLinefromPurchaseLine(PurchaseLine: Record "Purchase Line"; var Unconditional: Boolean)
begin
end;

Parameters:

  • PurchaseLine: The purchase line from which the calculation lines will be deleted.
  • Unconditional: Indicates if the deletion should be unconditional.

Remarks: This event allows subscribers to modify the behavior of the deletion process. If Unconditional is set to true, the deletion will proceed without any conditions. If Unconditional is set to false, the deletion may be conditional based on business logic.