KVSKBASalesPriceLib#
Procedures#
KVSKBAAddPricesHierachy(Codeunit Price Source List, Code[20], Code[20]) :#
procedure KVSKBAAddPricesHierachy(var PriceSourceList: Codeunit "Price Source List"; CustomerNo: Code[20]; ItemCategoryCode: Code[20]):
AddSalesPricesHierachCU7000(Record KVSKBASalesPrice, Record KVSKBASalesPrice, Record KVSKBASalesConditionLine, Code[20], Record Currency, Decimal, Date, Code[10], Decimal, Decimal, Code[20], Code[20], Code[10], Code[10]) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Adds the sales prices from the customer hierarchy to the sales price and sales condition line records to determine the best price.
[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 AddSalesPricesHierachCU7000(var FromSalesPrice: Record "KVSKBASalesPrice"; var ToSalesPrice: Record "KVSKBASalesPrice"; var ToSalesConditionLine: Record "KVSKBASalesConditionLine"; CustomerNo: Code[20]; Currency: Record "Currency"; CurrencyFactor: Decimal; ExchangeRateDate: Date; UOMCode: Code[10]; QtyPerUOM: Decimal; Quantity: Decimal; ItemNo: Code[20]; ItemCategoryCode: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]):
Parameters:
FromSalesPrice
: The sales price record to copy from.ToSalesPrice
: The sales price record to copy to.ToSalesConditionLine
: The sales condition line record to copy to.CustomerNo
: The customer number to use for the hierarchy.Currency
: The currency record to use for the sales prices.CurrencyFactor
: The currency factor to apply to the sales prices.ExchangeRateDate
: The date to use for the exchange rate.UOMCode
: The unit of measure code to use for the sales prices.QtyPerUOM
: The quantity per unit of measure to use for the sales prices.Quantity
: The quantity to use for the sales prices.ItemNo
: The item number to use for the sales prices.ItemCategoryCode
: The item category code to use for the sales prices.VariantCode
: The variant code to use for the sales prices.LocationCode
: The location code to use for the sales prices.
CopySalesCondLinesPriceCalculation(Record Price List Line, Record KVSKBASalesConditionLine, Code[20], Code[10], Code[10], Record Currency, Decimal, Date, Code[10], Decimal, Decimal) :#
Summary: Copies the sales condition lines for price conditions from a price list line to a sales condition line.
procedure CopySalesCondLinesPriceCalculation(var FromPriceListLine: Record "Price List Line"; var ToSalesConditionLine: Record "KVSKBASalesConditionLine"; ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; Currency: Record "Currency"; CurrencyFactor: Decimal; DocumentDate: Date; UOMCode: Code[10]; QtyPerUOM: Decimal; Quantity: Decimal):
Parameters:
FromPriceListLine
: The price list line to copy from.ToSalesConditionLine
: The sales condition line to copy to.ItemNo
: The item number to use for the sales condition line.VariantCode
: The variant code to use for the sales condition line.LocationCode
: The location code to use for the sales condition line.Currency
: The currency record to use for the sales condition line.CurrencyFactor
: The currency factor to apply to the sales condition line.DocumentDate
: The document date to use for the sales condition line.UOMCode
: The unit of measure code to use for the sales condition line.QtyPerUOM
: The quantity per unit of measure to use for the sales condition line.Quantity
: The quantity to use for the sales condition line.
Remarks: This procedure is used to copy sales condition lines for price conditions from a price list line to a sales condition line, calculating the necessary values based on the provided parameters. It handles the conversion of prices and units of measure, ensuring that the sales condition line is correctly populated with the calculated values.
CopySalesCondLinesLDiscPriceCalculation(Record Price List Line, Record KVSKBASalesConditionLine, Code[20], Decimal, Record Currency, Decimal, Date, Code[10], Decimal) :#
Summary: Copies the sales condition lines for discount line conditions from a price list line to a sales condition line, calculating the necessary values based on the provided parameters.
procedure CopySalesCondLinesLDiscPriceCalculation(var FromPriceListLine: Record "Price List Line"; var ToSalesConditionLine: Record "KVSKBASalesConditionLine"; ItemNo: Code[20]; InitialPrice: Decimal; Currency: Record "Currency"; CurrencyFactor: Decimal; DocumentDate: Date; UOMCode: Code[10]; QtyPerUOM: Decimal):
Parameters:
FromPriceListLine
: The price list line to copy from.ToSalesConditionLine
: The sales condition line to copy to.ItemNo
: The item number to use for the sales condition line.InitialPrice
: The initial price to use for the sales condition line.Currency
: The currency record to use for the sales condition line.CurrencyFactor
: The currency factor to apply to the sales condition line.DocumentDate
: The document date to use for the sales condition line.UOMCode
: The unit of measure code to use for the sales condition line.QtyPerUOM
: The quantity per unit of measure to use for the sales condition line.
Remarks: This procedure is used to copy sales condition lines for discount line conditions from a price list line to a sales condition line, calculating the necessary values based on the provided parameters. It handles the conversion of prices and units of measure, ensuring that the sales condition line is correctly populated with the calculated values.
CalcSalesPriceInitialPrice(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Record Item, Code[10], Code[10], Decimal, Decimal, Decimal, Code[10], Decimal, Date, Code[10], Decimal) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Calculates the initial price for a sales condition based on the base of calculation defined in the sales condition header.
[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 CalcSalesPriceInitialPrice(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; QtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchangeRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal):
Parameters:
SalesConditionHeader
: The sales condition header containing the base of calculation.SalesPrice
: The sales price record to calculate the initial price for.Item
: The item record to use for the calculation.VariantCode
: The variant code to use for the calculation.LocationCode
: The location code to use for the calculation.Quantity
: The quantity to use for the calculation.QtyPerUOM
: The quantity per unit of measure to use for the calculation.InitialPrice
: The variable to store the calculated initial price.InitialPriceCurrencyCode
: The variable to store the currency code of the initial price.InitialPriceCurrencyFactor
: The variable to store the currency factor of the initial price.InitialPriceExchangeRateDate
: The variable to store the exchange rate date of the initial price.InitialPriceUOMCode
: The variable to store the unit of measure code of the initial price.InitialPriceQtyPerUOM
: The variable to store the quantity per unit of measure of the initial price.
Remarks: This procedure is only used for old Pricing Engine and is marked as obsolete. This procedure calculates the initial price for a sales condition based on the base of calculation defined in the sales condition header. It handles different base of calculation types such as "Price Condition (Unit Cost)", "Price Condition (Last Direct Cost)", and "Price Condition (Direct Unit Cost)". If the base of calculation is not one of these types, it raises an error or calls an event to handle the case.
CalcSalesPriceInitialPrice(Record KVSKBASalesConditionHeader, Record Price List Line, Record Item, Code[10], Code[10], Decimal, Decimal, Decimal, Code[10], Decimal, Date, Code[10], Decimal) :#
Summary: Calculates the initial price for a sales condition based on the base of calculation defined in the sales condition header.
procedure CalcSalesPriceInitialPrice(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"; Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; QtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchangeRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal):
Parameters:
SalesConditionHeader
: The sales condition header containing the base of calculation.PriceListLine
: The price list line record to calculate the initial price for.Item
: The item record to use for the calculation.VariantCode
: The variant code to use for the calculation.LocationCode
: The location code to use for the calculation.Quantity
: The quantity to use for the calculation.QtyPerUOM
: The quantity per unit of measure to use for the calculation.InitialPrice
: The variable to store the calculated initial price.InitialPriceCurrencyCode
: The variable to store the currency code of the initial price.InitialPriceCurrencyFactor
: The variable to store the currency factor of the initial price.InitialPriceExchangeRateDate
: The variable to store the exchange rate date of the initial price.InitialPriceUOMCode
: The variable to store the unit of measure code of the initial price.InitialPriceQtyPerUOM
: The variable to store the quantity per unit of measure of the initial price.
Remarks: This procedure calculates the initial price for a sales condition based on the base of calculation defined in the sales condition header. It handles different base of calculation types such as "Price Condition (Unit Cost)", "Price Condition (Last Direct Cost)", and "Price Condition (Direct Unit Cost)". If the base of calculation is not one of these types, it raises an error or calls an event to handle the case.
CalcDirectUnitCostForSalesCondition(Record Item, Code[10], Code[10], Decimal, Decimal) : Decimal#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Calculates the direct unit cost for a sales condition based on the item, variant code, location code, quantity, and sales quantity per unit of measure.
[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 CalcDirectUnitCostForSalesCondition(Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; SalesQtyPerUOM: Decimal): Decimal
Parameters:
Item
: The item record to use for the calculation.VariantCode
: The variant code to use for the calculation.LocationCode
: The location code to use for the calculation.Quantity
: The quantity to use for the calculation.SalesQtyPerUOM
: The sales quantity per unit of measure to use for the calculation.
Returns: The calculated direct unit cost in local currency.
Remarks: This procedure is only used for old Pricing Engine and is marked as obsolete. This procedure calculates the direct unit cost for a sales condition based on the item, variant code, location code, quantity, and sales quantity per unit of measure. It retrieves the vendor information, currency exchange rate, and purchase unit of measure to perform the calculation. The direct unit cost is calculated in the vendor's currency and item's purchase unit of measure, but is returned in local currency and converted to base unit of measure. The line discount is subtracted from the calculated direct unit cost.
CalcDirectUnitCostForSalesConditionPriceListLine(Record Item, Code[10], Code[10], Decimal, Decimal) : Decimal#
Summary: Calculates the direct unit cost for a sales condition based on the item, variant code, location code, quantity, and sales quantity per unit of measure.
procedure CalcDirectUnitCostForSalesConditionPriceListLine(Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; SalesQtyPerUOM: Decimal): Decimal
Parameters:
Item
: The item record to use for the calculation.VariantCode
: The variant code to use for the calculation.LocationCode
: The location code to use for the calculation.Quantity
: The quantity to use for the calculation.SalesQtyPerUOM
: The sales quantity per unit of measure to use for the calculation.
Returns: The calculated direct unit cost in local currency.
Remarks: This procedure calculates the direct unit cost for a sales condition based on the item, variant code, location code, quantity, and sales quantity per unit of measure. It retrieves the vendor information, currency exchange rate, and purchase unit of measure to perform the calculation. The direct unit cost is calculated in the vendor's currency and item's purchase unit of measure, but is returned in local currency and converted to base unit of measure. The line discount is subtracted from the calculated direct unit cost.
CalculateSalesCondition(Record KVSKBASalesConditionHeader, Decimal, Code[10], Decimal, Date, Code[10], Decimal, Record Currency, Decimal, Date, Code[10], Decimal, Code[10], Decimal, Integer, Record KVSKBASalesConditionLine) :#
Summary: Calculates the sales condition lines based on the provided sales condition header and initial price parameters.
procedure CalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; InitialPrice: Decimal; InitialPriceCurrencyCode: Code[10]; InitialPriceCurrencyFactor: Decimal; InitialPriceExchangeRateDate: Date; InitialPriceUOMCode: Code[10]; InitialPriceQtyPerUOM: Decimal; Currency: Record "Currency"; CurrencyFactor: Decimal; ExchangeRateDate: Date; UOMCode: Code[10]; QtyPerUOM: Decimal; ItemUOMCode: Code[10]; ItemQtyPerUOM: Decimal; ReferenceNo: Integer; var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary):
Parameters:
SalesConditionHeader
: The sales condition header record.InitialPrice
: The initial price to use for the calculation.InitialPriceCurrencyCode
: The currency code of the initial price.InitialPriceCurrencyFactor
: The currency factor of the initial price.InitialPriceExchangeRateDate
: The exchange rate date of the initial price.InitialPriceUOMCode
: The unit of measure code of the initial price.InitialPriceQtyPerUOM
: The quantity per unit of measure of the initial price.Currency
: The currency record to use for the calculation.CurrencyFactor
: The currency factor to apply to the sales condition lines.ExchangeRateDate
: The exchange rate date to use for the calculation.UOMCode
: The unit of measure code to use for the calculation.QtyPerUOM
: The quantity per unit of measure to use for the calculation.ItemUOMCode
: The item unit of measure code to use for the calculation.ItemQtyPerUOM
: The item quantity per unit of measure to use for the calculation.ReferenceNo
: The reference number to use for the sales condition lines.TempSalesConditionLine
: The temporary sales condition line record to store the calculated sales condition lines.
Remarks: This procedure calculates the sales condition lines based on the provided sales condition header and initial price parameters. It creates the first sales condition line with the initial price and calculates the price, amount, and result for the other sales condition line. It also handles the currency conversion and rounding for the sales condition line. The procedure is used to set up the sales condition lines in the sales condition header.
ShowSalesPriceDiscCalcLines(Record Sales Line, Option) :#
Summary: Shows the sales price and discount calculation lines for a given sales line.
procedure ShowSalesPriceDiscCalcLines(var SalesLine: Record "Sales Line"; LineType: Option):
Parameters:
SalesLine
: The sales line record to show the calculation lines for.LineType
: The type of line to show, either Price or Line Discount.
Remarks: This procedure displays the sales price and discount calculation lines for a specified sales line. It uses the KVSKBASalesPriceDiscCalc page to show the calculation lines and allows the user to modify the sales line's unit price or line discount percentage based on the calculation results. If the user modifies the calculation lines, the sales line is updated accordingly.
ShowSalesPriceDiscCalcLineArch(Record Sales Line Archive, Option) :#
procedure ShowSalesPriceDiscCalcLineArch(SalesLineArchive: Record "Sales Line Archive"; LineType: Option):
Parameters:
SalesLineArchive
: The sales line archive record to show the calculation lines for.LineType
: The type of line to show, either Price or Line Discount.
Remarks: This procedure displays the sales price and discount calculation lines for a specified sales line archive. It uses the KVSKBASalesPriceDiscCalcArch page to show the calculation lines and allows the user to view the archived sales line's unit price or line discount percentage based on the calculation results. The user can view the archived calculation lines without modifying them.
ShowPostSalesPriceDiscCalcLine(Record Sales Header, Record Sales Line, Option, Code[20], Integer, Option) :#
Summary: Shows the posted sales price and discount calculation lines for a given posted sales header and line.
procedure ShowPostSalesPriceDiscCalcLine(PostedSalesHeader: Record "Sales Header"; PostedSalesLine: Record "Sales Line"; DocumentType: Option; DocumentNo: Code[20]; DocumentLineNo: Integer; LineType: Option):
Parameters:
PostedSalesHeader
: The posted sales header record to show the calculation lines for (as Sales Header Record, filled with TransferFields).PostedSalesLine
: The posted sales line record to show the calculation lines for (as Sales Line Record, filled with TransferFields).DocumentType
: The type of document to show, either Shipment, Invoice, Credit Memo, or Return Receipt.DocumentNo
: The document number to show the calculation lines for.DocumentLineNo
: The document line number to show the calculation lines for.LineType
: The type of line to show, either Price or Line Discount.
Remarks: This procedure displays the posted sales price and discount calculation lines for a specified posted sales header and line. It uses the KVSKBAPostedSalesPriceDiscCalc page to show the calculation lines and allows the user to view the posted sales line's unit price or line discount percentage based on the calculation results. The user can view the posted calculation lines without modifying them.
DeleteSalesPriceDiscCalcTab36(Record Sales Header) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Deletes all sales price and discount calculation lines for a given sales header.
[Obsolete('This procedure is no longer supported, please use DeleteSalesPriceDiscCalcLinesfromSalesHeader', '26.3')]
procedure DeleteSalesPriceDiscCalcTab36(SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader
: The sales header record to delete the calculation lines for.
Remarks: This procedure deletes all sales price and discount calculation lines associated with a specified sales header. It uses the KVSKBASalesPriceDiscCalcLine record to find and delete the calculation lines based on the document type and number of the sales header. The document line number is set to 0 to delete all lines related to the sales header.
DeleteSalesPriceDiscCalcLinesfromSalesHeader(Record Sales Header) :#
Summary: Deletes all sales price and discount calculation lines for a given sales header.
procedure DeleteSalesPriceDiscCalcLinesfromSalesHeader(SalesHeader: Record "Sales Header"):
Parameters:
SalesHeader
: The sales header record to delete the calculation lines for.
Remarks: This procedure deletes all sales price and discount calculation lines associated with a specified sales header. It uses the KVSKBASalesPriceDiscCalcLine record to find and delete the calculation lines based on the document type and number of the sales header. The document line number is set to 0 to delete all lines related to the sales header.
DeleteSalesPriceDiscCalcTab37(Record Sales Line, Option, Boolean, Decimal, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Deletes sales price and discount calculation lines from a sales line based on the specified line type and conditions.
[Obsolete('This procedure is no longer supported, please use DeleteSalesPriceDiscCalcLinefromSalesHeader', '26.3')]
procedure DeleteSalesPriceDiscCalcTab37(SalesLine: Record "Sales Line"; LineType: Option; Unconditional: Boolean; ComparativeValue: Decimal; HideConfirm: Boolean):
Parameters:
SalesLine
: The sales line record to delete the calculation lines from.LineType
: The type of line to delete, either Price or Line Discount.Unconditional
: If true, all calculation lines of the specified type will be deleted without confirmation. If false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value.ComparativeValue
: The value to compare against the calculated value in the sales price and discount calculation lines. If the comparative value differs from the calculated value, the user will be prompted to confirm deletion.HideConfirm
: If true, the confirmation prompt will be hidden, allowing deletion without user interaction. If false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value.
Remarks: This procedure deletes sales price and discount calculation lines from a specified sales line based on the line type. If the Unconditional parameter is true, all calculation lines of the specified type will be deleted without confirmation. If the Unconditional parameter is false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value in the sales price and discount calculation lines. The HideConfirm parameter controls whether the confirmation prompt is displayed or hidden.
DeleteSalesPriceDiscCalcLinesfromSalesLine(Record Sales Line, Option, Boolean, Decimal, Boolean) :#
Summary: Deletes sales price and discount calculation lines from a sales line based on the specified line type and conditions.
procedure DeleteSalesPriceDiscCalcLinesfromSalesLine(SalesLine: Record "Sales Line"; LineType: Option; Unconditional: Boolean; ComparativeValue: Decimal; HideConfirm: Boolean):
Parameters:
SalesLine
: The sales line record to delete the calculation lines from.LineType
: The type of line to delete, either Price or Line Discount.Unconditional
: If true, all calculation lines of the specified type will be deleted without confirmation. If false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value.ComparativeValue
: The value to compare against the calculated value in the sales price and discount calculation lines. If the comparative value differs from the calculated value, the user will be prompted to confirm deletion.HideConfirm
: If true, the confirmation prompt will be hidden, allowing deletion without user interaction. If false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value.
Remarks: This procedure deletes sales price and discount calculation lines from a specified sales line based on the line type. If the Unconditional parameter is true, all calculation lines of the specified type will be deleted without confirmation. If the Unconditional parameter is false, the user will be prompted to confirm deletion if the comparative value differs from the calculated value in the sales price and discount calculation lines. The HideConfirm parameter controls whether the confirmation prompt is displayed or hidden.
DeletePostSalesPriceDiscT110(Record Sales Shipment Header) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Deletes posted sales price and discount lines from a sales shipment.
[Obsolete('This procedure is no longer supported, please use DeletePostedSalesPriceDiscLinesfromSalesShipment', '26.3')]
procedure DeletePostSalesPriceDiscT110(SalesShipmentHeader: Record "Sales Shipment Header"):
Parameters:
SalesShipmentHeader
: The sales shipment header record to delete the posted sales price and discount lines from.
Remarks: This procedure deletes all posted sales price and discount lines associated with a specified sales shipment. It uses the KVSKBAPostedSalesPriceDiscLine record to find and delete the posted sales price and discount lines based on the document type and number of the sales shipment. The document type is set to Shipment, and the document number is set to the sales shipment header's number.
DeletePostedSalesPriceDiscLinesfromSalesShipment(Record Sales Shipment Header) :#
Summary: Deletes posted sales price and discount lines from a sales shipment.
procedure DeletePostedSalesPriceDiscLinesfromSalesShipment(SalesShipmentHeader: Record "Sales Shipment Header"):
Parameters:
SalesShipmentHeader
: The sales shipment header record to delete the posted sales price and discount lines from.
Remarks: This procedure deletes all posted sales price and discount lines associated with a specified sales shipment. It uses the KVSKBAPostedSalesPriceDiscLine record to find and delete the posted sales price and discount lines based on the document type and number of the sales shipment. The document type is set to Shipment, and the document number is set to the sales shipment header's number.
CopySalesPriceDiscTab37Tab37(Record Sales Line, Record Sales Line) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Copies sales price and discount calculation lines from a source sales line to a target sales line.
[Obsolete('This procedure is no longer supported, please use CopySalesPriceDiscCalcLinesfromSalesLinetoSalesline', '26.3')]
procedure CopySalesPriceDiscTab37Tab37(FromSalesLine: Record "Sales Line"; ToSalesLine: Record "Sales Line"):
Parameters:
FromSalesLine
: The source sales line record to copy the calculation lines from.ToSalesLine
: The target sales line record to copy the calculation lines to.
Remarks: This procedure copies sales price and discount calculation lines from a specified source sales line to a target sales line. It uses the KVSKBASalesPriceDiscCalcLine record to find the calculation lines associated with the source sales line and creates new calculation lines in the target sales line based on the source line's document type, document number, and line number. The copied lines will have the same values as the source lines, but with the target sales line's document type, document number, and line number.
CopySalesPriceDiscCalcLinesfromSalesLinetoSalesline(Record Sales Line, Record Sales Line) :#
Summary: Copies sales price and discount calculation lines from a source sales line to a target sales line.
procedure CopySalesPriceDiscCalcLinesfromSalesLinetoSalesline(FromSalesLine: Record "Sales Line"; ToSalesLine: Record "Sales Line"):
Parameters:
FromSalesLine
: The source sales line record to copy the calculation lines from.ToSalesLine
: The target sales line record to copy the calculation lines to.
Remarks: This procedure copies sales price and discount calculation lines from a specified source sales line to a target sales line. It uses the KVSKBASalesPriceDiscCalcLine record to find the calculation lines associated with the source sales line and creates new calculation lines in the target sales line based on the source line's document type, document number, and line number. The copied lines will have the same values as the source lines, but with the target sales line's document type, document number, and line number.
CopySalesPriceDiscTab5108Tab37(Record Sales Line Archive, Record Sales Line) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: Copies sales price and discount calculation lines from a sales line archive to a sales line.
[Obsolete('This procedure is no longer supported, please use CopySalesPriceDiscCalcLinesfromSalesLineArchivetoSalesLine', '26.3')]
procedure CopySalesPriceDiscTab5108Tab37(FromSalesLineArchive: Record "Sales Line Archive"; ToSalesLine: Record "Sales Line"):
Parameters:
FromSalesLineArchive
: The sales line archive record to copy the calculation lines from.ToSalesLine
: The target sales line record to copy the calculation lines to.
Remarks: This procedure copies sales price and discount calculation lines from a specified sales line archive to a target sales line. It uses the KVSKBASalesPriceDiscCalcLine record to find the calculation lines associated with the sales line archive and creates new calculation lines in the target sales line based on the archive's document type, document number, and line number. The copied lines will have the same values as the archive lines, but with the target sales line's document type, document number, and line number.
CopySalesPriceDiscCalcLinesfromSalesLineArchivetoSalesLine(Record Sales Line Archive, Record Sales Line) :#
Summary: Copies sales price and discount calculation lines from a sales line archive to a sales line.
procedure CopySalesPriceDiscCalcLinesfromSalesLineArchivetoSalesLine(FromSalesLineArchive: Record "Sales Line Archive"; ToSalesLine: Record "Sales Line"):
Parameters:
FromSalesLineArchive
: The sales line archive record to copy the calculation lines from.ToSalesLine
: The target sales line record to copy the calculation lines to.
Remarks: This procedure copies sales price and discount calculation lines from a specified sales line archive to a target sales line. It uses the KVSKBASalesPriceDiscCalcLine record to find the calculation lines associated with the sales line archive and creates new calculation lines in the target sales line based on the archive's document type, document number, and line number. The copied lines will have the same values as the archive lines, but with the target sales line's document type, document number, and line number.
NewCalcUPriceLDiscSalesLine(Record Sales Line, Record Sales Line) :#
Summary: This function starts a new calculation of the fields "Unit Price" and "Line Discount %" of a sales line.
procedure NewCalcUPriceLDiscSalesLine(var SourceSalesLine: Record "Sales Line"; OldSalesLine: Record "Sales Line"):
Parameters:
SourceSalesLine
: Record of sales line where the prices and discounts are to be recalculated.OldSalesLine
: Record of sales line that is used to temporarily set xRec in the function KVSKBAUpdateUnitPriceByExternCall.
Returns: Returns the recalculated sales line with updated unit price and line discount percentage.
Remarks: The sales line must not be filtered, otherwise the function will not work correctly. The price origin and discount origin are reset in the process.
NewCalcUPriceLDiscSalesLines(Record Sales Line) :#
Summary: This procedure recalculates the unit price and line discount for all sales lines in a sales document.
procedure NewCalcUPriceLDiscSalesLines(var SalesLine: Record "Sales Line"):
Parameters:
SalesLine
: The sales line record to recalculate the unit price and line discount for.
Remarks: The Salesline must be filtered, otherwise all lines will be recalculated. This procedure iterates through all sales lines in a sales document and recalculates the unit price and line discount. It uses the KVSKBASalesPriceCalcLib codeunit to perform the recalculation. The procedure collects all combinations of "Item No.", "Variant Code", etc. for which unit prices and line discounts must be updated in a temporary buffer (TempSalesPurchPriceCalcBuf). After recalculating the unit price and line discount for each sales line, it updates the sales lines in the database. If the "KVSKBAImmediatePriceUpdate" setting is enabled, it also updates the unit prices for other items in the sales document.
SavePriceAndDiscount(Record Sales Line, Record Sales Line) :#
Summary: Saves the prices and discounts from the selected sales lines to the database.
procedure SavePriceAndDiscount(SalesLine: Record "Sales Line"; var FilteredSalesLine: Record "Sales Line"):
Parameters:
SalesLine
: The sales line record containing the document type and number.FilteredSalesLine
: The filtered sales line record to save the prices and discounts from.
Remarks: This procedure allows the user to save prices and discounts from selected sales lines. It checks if there are any sales lines of type Item, G/L Account, or Resource (if extended price calculation is enabled). If no such lines are found, it displays a message to the user. If lines are found, it copies them to a temporary records and opens a page for saving the prices and discounts. The user can then confirm the save operation, which will execute the saving logic.
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 based on the Sales & Receivables Setup.
[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 Sales & Receivables 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 or the value is not set to "Ext. Price Calculation", it returns false.
SetCalcDate(Date) :#
Summary: Sets the calculation date for sales price and discount calculations.
procedure SetCalcDate(NewDate: Date):
Parameters:
NewDate
: The new calculation date to set.
Remarks: This procedure sets the calculation date for sales price and 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 sales prices and discounts.
GetCalcDate() : Date#
Summary: Gets the current calculation date for sales price and discount calculations.
procedure GetCalcDate(): Date
Returns: Returns the current calculation date.
Remarks: This procedure retrieves the current calculation date for sales price and 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 sales prices and discounts.
Events#
OnShowSalesPriceDiscCalcLinesOnbeforeCaseLineTypePrice(Record Sales Line, Option, Boolean) :#
Summary: This event is triggered before at saving the sales price to the sales line and bofore set the KVSKBAPriceOrigin.
[IntegrationEvent(false, false)]
local procedure OnShowSalesPriceDiscCalcLinesOnbeforeCaseLineTypePrice(var SalesLine: Record "Sales Line"; LineType: Option; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnShowSalesPriceDiscCalcLinesOnbeforeCaseLineTypePrice', '', false, false)]
local procedure DoSomethingOnShowSalesPriceDiscCalcLinesOnbeforeCaseLineTypePrice(var SalesLine: Record "Sales Line"; LineType: Option; var Handled: Boolean)
begin
end;
Parameters:
SalesLine
: Record of Sales Line.LineType
: Option indicating the type of line (Price or Line Discount).Handled
: Boolean value indicating if the event has been handled.
Remarks: This event is used to allow customization of the behavior before saving the sales price to the sales line. It can be used to modify the Sales Line or to set the Handled parameter to true to indicate that the event has been handled and no further processing is needed.
OnBeforeShowSalesPriceDiscCalcLines(Record Sales Line, Option, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('This event is no longer supported, please use OnBeforeShowSalesPriceDiscountCalcLines', '26.3')]
[IntegrationEvent(false, false)]
local procedure OnBeforeShowSalesPriceDiscCalcLines(var SalesLineVar: Record "Sales Line"; LineTypePar: Option; var Handled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnBeforeShowSalesPriceDiscCalcLines', '', false, false)]
local procedure DoSomethingOnBeforeShowSalesPriceDiscCalcLines(var SalesLineVar: Record "Sales Line"; LineTypePar: Option; var Handled: Boolean)
begin
end;
OnBeforeShowSalesPriceDiscountCalcLines(Record Sales Line, Option, Boolean) :#
Summary: This event is triggered before showing the sales price and discount calculation lines.
[IntegrationEvent(false, false)]
local procedure OnBeforeShowSalesPriceDiscountCalcLines(var SalesLine: Record "Sales Line"; LineType: Option; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnBeforeShowSalesPriceDiscountCalcLines', '', false, false)]
local procedure DoSomethingOnBeforeShowSalesPriceDiscountCalcLines(var SalesLine: Record "Sales Line"; LineType: Option; var IsHandled: Boolean)
begin
end;
Parameters:
SalesLineVar
: Record of Sales Line.LineTypePar
: Option indicating the type of line (Price or Line Discount).Handled
: Boolean value indicating if the event has been handled.
Remarks: This event is used to allow customization of the behavior before showing the sales price and discount calculation lines. It can be used to modify the Sales Line or Line Type parameters or to set the Handled parameter to true to indicate that the event has been handled and no further processing is needed.
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::"KVSKBASalesPriceLib", 'OnBeforeCheckExtendedPriceCalcEnabled', '', false, false)]
local procedure DoSomethingOnBeforeCheckExtendedPriceCalcEnabled(var ExtendedPriceCalcEnabled: Boolean; var Handled: Boolean)
begin
end;
Parameters:
ExtendedPriceCalcEnabled
: Boolean value indicating if the extended price calculation is enabled.Handled
: Boolean value indicating if the event has been handled.
Remarks: This event is only used for old Pricing Engine and is marked as obsolete. This event is used to allow customization of the behavior before checking if the extended price calculation is enabled. It can be used to modify the ExtendedPriceCalcEnabled parameter or to set the Handled parameter to true to indicate that the event has been handled and no further processing is needed.
OnLookupSalesCondNoInSalesPriceOnAfterSetfilter(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: This event is triggered when setting a filter for the Sales Condition No. in a sales price.
[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 OnLookupSalesCondNoInSalesPriceOnAfterSetfilter(var SalesCondHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnLookupSalesCondNoInSalesPriceOnAfterSetfilter', '', false, false)]
local procedure DoSomethingOnLookupSalesCondNoInSalesPriceOnAfterSetfilter(var SalesCondHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice")
begin
end;
Parameters:
SalesCondHeader
: Record of KVSKBASalesConditionHeader.SalesPrice
: Record of KVSKBASalesPrice.
Remarks: This event is only used for old Pricing Engine and is marked as obsolete. This event is used to handle the case when a filter needs to be set for the sales condition number in a sales price. It is used to the Filters for a Lookup Page for Sales Condition No. in Sales Price.
OnLookupSalesPriceCondNoInPriceListLineOnAfterSetFilter(Record KVSKBASalesConditionHeader, Record Price List Line) :#
Summary: This event is triggered when setting a filter for the Price Condition No. in a price list line.
[IntegrationEvent(false, false)]
local procedure OnLookupSalesPriceCondNoInPriceListLineOnAfterSetFilter(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnLookupSalesPriceCondNoInPriceListLineOnAfterSetFilter', '', false, false)]
local procedure DoSomethingOnLookupSalesPriceCondNoInPriceListLineOnAfterSetFilter(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line")
begin
end;
Parameters:
KVSKBASalesConditionHeader
: Record of KVSKBASalesConditionHeader.PriceListLine
: Record of Price List Line.
Remarks: This event is used to handle the case when a filter needs to be set for the sales condition number in a price list line. It is used to the Filters for a Lookup Page for Price Condition No. in Price List Line.
OnLookupSalesCondNoInSalesLiDiscOnAfterSetfilter(Record KVSKBASalesConditionHeader, Record KVSKBASalesLineDiscount) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: This event is triggered when setting a filter for the Sales Condition No. in a sales line discount.
[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 OnLookupSalesCondNoInSalesLiDiscOnAfterSetfilter(var SalesCondHeader: Record "KVSKBASalesConditionHeader"; SalesLineDiscount: Record "KVSKBASalesLineDiscount"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnLookupSalesCondNoInSalesLiDiscOnAfterSetfilter', '', false, false)]
local procedure DoSomethingOnLookupSalesCondNoInSalesLiDiscOnAfterSetfilter(var SalesCondHeader: Record "KVSKBASalesConditionHeader"; SalesLineDiscount: Record "KVSKBASalesLineDiscount")
begin
end;
Parameters:
SalesCondHeader
: Record of KVSKBASalesConditionHeader.SalesLineDiscount
: Record of KVSKBASalesLineDiscount.
Remarks: This event is only used for old Pricing Engine and is marked as obsolete. This event is used to handle the case when a filter needs to be set for the sales condition number in a sales line discount. It is used to the Filters for a Lookup Page for Sales Condition No. in Sales Line Discount.
OnLookupSalesDiscountCondNoInPriceListLineDiscOnAfterSetfilter(Record KVSKBASalesConditionHeader, Record Price List Line) :#
Summary: This event is triggered when setting a filter for the Discount Condition No. in a price list line.
[IntegrationEvent(false, false)]
local procedure OnLookupSalesDiscountCondNoInPriceListLineDiscOnAfterSetfilter(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnLookupSalesDiscountCondNoInPriceListLineDiscOnAfterSetfilter', '', false, false)]
local procedure DoSomethingOnLookupSalesDiscountCondNoInPriceListLineDiscOnAfterSetfilter(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line")
begin
end;
Parameters:
KVSKBASalesConditionHeader
: Record of KVSKBASalesConditionHeader.PriceListLine
: Record of Price List Line.
Remarks: This event is used to handle the case when a filter needs to be set for the sales condition number in a price list line discount. It is used to the Filters for a Lookup Page for Discount Condition No. in Price List Line.
OnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculation(Record KVSKBASalesPrice, Record KVSKBASalesConditionHeader, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: This event is triggered when checking if the base of calculation is allowed for a sales condition line in a sales price.
[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 OnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculation(SalesPrice: Record "KVSKBASalesPrice"; SalesCondHeader: Record "KVSKBASalesConditionHeader"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculation', '', false, false)]
local procedure DoSomethingOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculation(SalesPrice: Record "KVSKBASalesPrice"; SalesCondHeader: Record "KVSKBASalesConditionHeader"; var IsHandled: Boolean)
begin
end;
Parameters:
SalesPrice
: Record of KVSKBASalesPrice.SalesCondHeader
: Record of KVSKBASalesConditionHeader.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: This event is only used for old Pricing Engine and is marked as obsolete. This event is used to handle the case when the base of calculation for a sales condition line in a sales price is not recognized. It allows for custom logic to be executed based on the sales price and sales condition header. The parameters provide information about the sales price and sales condition header. The IsHandled parameter indicates whether the event has been handled or not. This event can be used to perform additional actions when checking if the base of calculation is allowed for a sales condition line in a sales price. It allows for custom logic to be executed based on the sales price and sales condition header. The parameters provide information about the sales price and sales condition header.
OnCalcSalesPriceCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculation(Record Price List Line, Record KVSKBASalesConditionHeader, Boolean) :#
Summary: This event is triggered when checking if the base of calculation is allowed for a sales condition line in a price list line.
[IntegrationEvent(false, false)]
local procedure OnCalcSalesPriceCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculation(PriceListLine: Record "Price List Line"; KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalcSalesPriceCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculation', '', false, false)]
local procedure DoSomethingOnCalcSalesPriceCondNoInPriceListLineOnBeforeCheckAllowBaseofCalculation(PriceListLine: Record "Price List Line"; KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; var IsHandled: Boolean)
begin
end;
Parameters:
PriceListLine
: Record of Price List Line.KVSKBASalesConditionHeader
: Record of KVSKBASalesConditionHeader.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: This event is used to handle the case when the base of calculation for a sales condition line in a price list line is not recognized. It allows for custom logic to be executed based on the price list line and sales condition header. The parameters provide information about the price list line and sales condition header. The IsHandled parameter indicates whether the event has been handled or not. This event can be used to perform additional actions when checking if the base of calculation is allowed for a sales condition line in a price list line. It allows for custom logic to be executed based on the price list line and sales condition header. The parameters provide information about the price list line and sales condition header.
OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElse(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Record Item, Code[10], Code[10], Decimal, Decimal, Decimal, Code[10], Decimal, Date, Code[10], Decimal, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('This event is no longer supported, please use OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnCaseElse or the new Pricing', '26.3')]
[IntegrationEvent(false, false)]
local procedure OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElse(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocQty: Decimal; DocQtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElse', '', false, false)]
local procedure DoSomethingOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElse(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocQty: Decimal; DocQtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal; var IsHandled: Boolean)
begin
end;
OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnCaseElse(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Record Item, Code[10], Code[10], Decimal, Decimal, Decimal, Code[10], Decimal, Date, Code[10], Decimal, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: This event is triggered when calculating the initial price for a sales condition line. This event is used to handle the case when the BaseofCalculation for a sales condition line is not recognized.
[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(true, false)]
local procedure OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnCaseElse(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocQty: Decimal; DocQtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnCaseElse', '', false, false)]
local procedure DoSomethingOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnCaseElse(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; SalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocQty: Decimal; DocQtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
SalesConditionHeader
: Record of KVSKBASalesConditionHeader.SalesPrice
: Record of KVSKBASalesPrice.Item
: Record of Item.DocVariantCode
: Code of the document variant.DocLocationCode
: Code of the document location.DocQty
: Decimal value of the document quantity.DocQtyPerUOM
: Decimal value of the document quantity per unit of measure.InitialPrice
: Decimal value of the initial price.InitialPriceCurrencyCode
: Code of the initial price currency.InitialPriceCurrencyFactor
: Decimal value of the initial price currency factor.InitialPriceExchRateDate
: Date of the initial price exchange.InitialPriceUOMCode
: Code of the initial price unit of measure.InitialPriceQtyPerUOM
: Decimal value of the initial price quantity per unit of measure.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: This event is only used for old Pricing Engine and is marked as obsolete. This event is used to handle the case when the BaseofCalculation for a sales condition line is not recognized. This event can be used to perform additional actions when calculating the initial price for a sales condition line. It allows for custom logic to be executed based on the sales condition header, sales price, item, document variant code, document location code, document quantity, document quantity per unit of measure, and initial price details. The parameters provide information about the sales condition, sales price, item, document variant, document location, document quantity, and initial price details.
OnCalcSalesPriceInitialPricePriceLineListOnCaseBaseofCalculationOnCaseElse(Record KVSKBASalesConditionHeader, Record Price List Line, Record Item, Code[10], Code[10], Decimal, Decimal, Decimal, Code[10], Decimal, Date, Code[10], Decimal, Boolean) :#
Summary: This event is triggered when calculating the initial price for a sales condition line.
[IntegrationEvent(true, false)]
local procedure OnCalcSalesPriceInitialPricePriceLineListOnCaseBaseofCalculationOnCaseElse(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"; Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocQty: Decimal; DocQtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalcSalesPriceInitialPricePriceLineListOnCaseBaseofCalculationOnCaseElse', '', false, false)]
local procedure DoSomethingOnCalcSalesPriceInitialPricePriceLineListOnCaseBaseofCalculationOnCaseElse(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"; Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocQty: Decimal; DocQtyPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQtyPerUOM: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
KVSKBASalesConditionHeader
: Record of KVSKBASalesConditionHeader.PriceListLine
: Record of Price List Line.Item
: Record of Item.DocVariantCode
: Code of the document variant.DocLocationCode
: Code of the document location.DocQty
: Decimal value of the document quantity.DocQtyPerUOM
: Decimal value of the document quantity per unit of measure.InitialPrice
: Decimal value of the initial price.InitialPriceCurrencyCode
: Code of the initial price currency.InitialPriceCurrencyFactor
: Decimal value of the initial price currency factor.InitialPriceExchRateDate
: Date of the initial price exchange rate.InitialPriceUOMCode
: Code of the initial price unit of measure.InitialPriceQtyPerUOM
: Decimal value of the initial price quantity per unit of measure.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: This event can be used to perform additional actions when calculating the initial price for a sales condition line. It allows for custom logic to be executed based on the sales condition header, price list line, item, document variant code, document location code, document quantity, document quantity per unit of measure, and initial price details. The parameters provide information about the sales condition, price list line, item, document variant, document location, document quantity, and initial price details.
OnAfterCalculateSalesCondition(Record KVSKBASalesConditionHeader, Decimal, Code[10], Decimal, Date, Code[10], Decimal, Record Currency, Decimal, Date, Code[10], Decimal, Code[10], Decimal, Integer, Record KVSKBASalesConditionLine) :#
Summary: This event is triggered after calculating the sales condition.
[IntegrationEvent(false, false)]
local procedure OnAfterCalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; InitialPrice: Decimal; InitialPriceCurrencyCode: Code[10]; InitialPriceCurrencyFactor: Decimal; initialPriceExchRateDate: Date; InitialPriceUOMCode: Code[10]; InitialPriceQtyPerUOM: Decimal; DocCurrency: Record "Currency"; DocCurrencyFactor: Decimal; DocExchRateDate: Date; DocUOMCode: Code[10]; DocQtyPerUOM: Decimal; UOMCode: Code[10]; QtyPerUOM: Decimal; ReferenceNo: Integer; var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnAfterCalculateSalesCondition', '', false, false)]
local procedure DoSomethingOnAfterCalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; InitialPrice: Decimal; InitialPriceCurrencyCode: Code[10]; InitialPriceCurrencyFactor: Decimal; initialPriceExchRateDate: Date; InitialPriceUOMCode: Code[10]; InitialPriceQtyPerUOM: Decimal; DocCurrency: Record "Currency"; DocCurrencyFactor: Decimal; DocExchRateDate: Date; DocUOMCode: Code[10]; DocQtyPerUOM: Decimal; UOMCode: Code[10]; QtyPerUOM: Decimal; ReferenceNo: Integer; var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary)
begin
end;
Parameters:
SalesConditionHeader
: Record of KVSKBASalesConditionHeader.InitialPrice
: Decimal value of the initial price.InitialPriceCurrencyCode
: Code of the initial price currency.InitialPriceCurrencyFactor
: Decimal value of the initial price currency factor.initialPriceExchRateDate
: Date of the initial price exchange rate.InitialPriceUOMCode
: Code of the initial price unit of measure.InitialPriceQtyPerUOM
: Decimal value of the initial price quantity per unit of measure.DocCurrency
: Record of Currency.DocCurrencyFactor
: Decimal value of the document currency factor.DocExchRateDate
: Date of the document exchange rate.DocUOMCode
: Code of the document unit of measure.DocQtyPerUOM
: Decimal value of the document quantity per unit of measure.DocQty
: Decimal value of the document quantity.UOMCode
: Code of the unit of measure.QtyPerUOM
: Decimal value of the quantity per unit of measure.ReferenceNo
: Integer value of the reference number.TempSalesConditionLine
: Temporary record of KVSKBASalesConditionLine.
Remarks: This event can be used to perform additional actions after the sales condition has been calculated. It allows for custom logic to be executed after the calculation is complete. The parameters provide information about the sales condition, initial price, document currency, unit of measure, and temporary sales condition lines.
OnCopySalesCondLinesPriceCU7000OnBeforeItemGet(Record KVSKBASalesPrice, Record KVSKBASalesConditionLine, Record Item, Code[10], Code[10], Record Currency, Decimal, Date, Code[10], Decimal, Decimal, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
Summary: This event is triggered before getting the item for a sales condition line during the price calculation.
[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 OnCopySalesCondLinesPriceCU7000OnBeforeItemGet(var SalesPrice: Record "KVSKBASalesPrice"; var SalesConditionLine: Record "KVSKBASalesConditionLine"; var Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocCurrency: Record "Currency"; DocCurrencyFactor: Decimal; DocExchRateDate: Date; DocUOMCode: Code[10]; DocQtyPerUOM: Decimal; DocQty: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCopySalesCondLinesPriceCU7000OnBeforeItemGet', '', false, false)]
local procedure DoSomethingOnCopySalesCondLinesPriceCU7000OnBeforeItemGet(var SalesPrice: Record "KVSKBASalesPrice"; var SalesConditionLine: Record "KVSKBASalesConditionLine"; var Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocCurrency: Record "Currency"; DocCurrencyFactor: Decimal; DocExchRateDate: Date; DocUOMCode: Code[10]; DocQtyPerUOM: Decimal; DocQty: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
SalesPrice
: Record of KVSKBASalesPrice.SalesConditionLine
: Record of KVSKBASalesConditionLine.Item
: Record of Item.DocVariantCode
: Code of the document variant.DocLocationCode
: Code of the document location.DocCurrency
: Record of Currency.DocCurrencyFactor
: Decimal value of the document currency factor.DocExchRateDate
: Date of the document exchange rate.DocUOMCode
: Code of the document unit of measure.DocQtyPerUOM
: Decimal value of the document quantity per unit of measure.DocQty
: Decimal value of the document quantity.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: This event is only used for old Pricing Engine and is marked as obsolete.
OnCopySalesCondLinesPriceCalculationOnBeforeItemGet(Record Price List Line, Record KVSKBASalesConditionLine, Record Item, Code[10], Code[10], Record Currency, Decimal, Date, Code[10], Decimal, Decimal, Boolean, Code[20]) :#
Summary: This event is triggered before getting the item for a sales condition line during the price calculation.
[IntegrationEvent(false, false)]
local procedure OnCopySalesCondLinesPriceCalculationOnBeforeItemGet(var PriceListLine: Record "Price List Line"; var KVSKBASalesConditionLine: Record "KVSKBASalesConditionLine"; var Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocCurrency: Record "Currency"; DocCurrencyFactor: Decimal; DocExchRateDate: Date; DocUOMCode: Code[10]; DocQtyPerUOM: Decimal; DocQty: Decimal; var IsHandled: Boolean; ItemNo: Code[20]):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCopySalesCondLinesPriceCalculationOnBeforeItemGet', '', false, false)]
local procedure DoSomethingOnCopySalesCondLinesPriceCalculationOnBeforeItemGet(var PriceListLine: Record "Price List Line"; var KVSKBASalesConditionLine: Record "KVSKBASalesConditionLine"; var Item: Record "Item"; DocVariantCode: Code[10]; DocLocationCode: Code[10]; DocCurrency: Record "Currency"; DocCurrencyFactor: Decimal; DocExchRateDate: Date; DocUOMCode: Code[10]; DocQtyPerUOM: Decimal; DocQty: Decimal; var IsHandled: Boolean; ItemNo: Code[20])
begin
end;
Parameters:
PriceListLine
: Record of Price List Line.KVSKBASalesConditionLine
: Record of KVSKBASalesConditionLine.Item
: Record of Item.DocVariantCode
: Code of the document variant.DocLocationCode
: Code of the document location.DocCurrency
: Record of Currency.DocCurrencyFactor
: Decimal value of the document currency factor.DocExchRateDate
: Date of the document exchange rate.DocUOMCode
: Code of the document unit of measure.DocQtyPerUOM
: Decimal value of the document quantity per unit of measure.DocQty
: Decimal value of the document quantity.IsHandled
: Boolean value indicating if the event has been handled.ItemNo
: Code of the item.
Remarks: This event can be used to modify the logic for getting the item for a sales condition line during the price calculation. It allows for custom logic to be executed before the item is retrieved.
OnBeforeCheckWriteDiscountLinesOnCalculateSalesCondition(Record KVSKBASalesConditionHeader, Boolean, Boolean) :#
Summary: This event is triggered before checking if the discount lines should be written during the calculation of a sales condition.
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckWriteDiscountLinesOnCalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; var ReturnValue: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnBeforeCheckWriteDiscountLinesOnCalculateSalesCondition', '', false, false)]
local procedure DoSomethingOnBeforeCheckWriteDiscountLinesOnCalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; var ReturnValue: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
SalesConditionHeader
: Record of KVSKBASalesConditionHeader.ReturnValue
: Boolean value indicating if the discount lines should be written.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: The following BaseofCalculation are permitted by default: "Discount Condition"
OnBeforeCheckWritePriceLinesOnCalculateSalesCondition(Record KVSKBASalesConditionHeader, Boolean, Boolean) :#
Summary: This event is triggered before checking if the price condition lines should be written during the calculation of a sales condition.
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckWritePriceLinesOnCalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; var ReturnValue: Boolean; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnBeforeCheckWritePriceLinesOnCalculateSalesCondition', '', false, false)]
local procedure DoSomethingOnBeforeCheckWritePriceLinesOnCalculateSalesCondition(SalesConditionHeader: Record "KVSKBASalesConditionHeader"; var ReturnValue: Boolean; var IsHandled: Boolean)
begin
end;
Parameters:
SalesConditionHeader
: Record of KVSKBASalesConditionHeader.ReturnValue
: Boolean value indicating if the price lines should be written.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: The following BaseofCalculation are permitted by default: "Price Condition (Direct Unit Cost)", "Price Condition (Last Direct Cost)", "Price Condition (Unit Cost)"
OnCopySalesCondLinesPriceCalculationOnAfterAssignPriceListLineValues(Record Price List Line, Record Price List Line, Record KVSKBASalesConditionLine) :#
Summary: This event is triggered after assigning values from a Sales Condition Line to a Price List Line. It allows for custom logic to be executed after the assignment takes place.
[IntegrationEvent(false, false)]
local procedure OnCopySalesCondLinesPriceCalculationOnAfterAssignPriceListLineValues(var xPriceListLine: Record "Price List Line"; var PriceListLine: Record "Price List Line"; KVSKBASalesConditionLine: Record "KVSKBASalesConditionLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCopySalesCondLinesPriceCalculationOnAfterAssignPriceListLineValues', '', false, false)]
local procedure DoSomethingOnCopySalesCondLinesPriceCalculationOnAfterAssignPriceListLineValues(var xPriceListLine: Record "Price List Line"; var PriceListLine: Record "Price List Line"; KVSKBASalesConditionLine: Record "KVSKBASalesConditionLine")
begin
end;
Parameters:
xPriceListLine
: Record of Price List Line.PriceListLine
: Record of Price List Line.KVSKBASalesConditionLine
: Record of KVSKBASalesConditionLine.
Remarks: This event can be used to modify the values of the Price List Line after they have been assigned from the Sales Condition Line.
OnCopySalesCondLinesPriceCalculationOnBeforeAssignPriceListLineValues(Record Price List Line, Record Price List Line, Record KVSKBASalesConditionLine) :#
Summary: This event is triggered before assigning values from a Sales Condition Line to a Price List Line. It allows for custom logic to be executed before the assignment takes place.
[IntegrationEvent(false, false)]
local procedure OnCopySalesCondLinesPriceCalculationOnBeforeAssignPriceListLineValues(var xPriceListLine: Record "Price List Line"; var PriceListLine: Record "Price List Line"; KVSKBASalesConditionLine: Record "KVSKBASalesConditionLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCopySalesCondLinesPriceCalculationOnBeforeAssignPriceListLineValues', '', false, false)]
local procedure DoSomethingOnCopySalesCondLinesPriceCalculationOnBeforeAssignPriceListLineValues(var xPriceListLine: Record "Price List Line"; var PriceListLine: Record "Price List Line"; KVSKBASalesConditionLine: Record "KVSKBASalesConditionLine")
begin
end;
Parameters:
xPriceListLine
: Record of Price List Line.PriceListLine
: Record of Price List Line.KVSKBASalesConditionLine
: Record of KVSKBASalesConditionLine.
Remarks: This event can be used to modify the values being assigned from the Sales Condition Line to the Price List Line.
OnBeforeCalcSalesPriceInitialPrice(Record KVSKBASalesConditionHeader, Record Price List Line, Record Item) :#
Summary: This event is triggered before calculating the initial price for a sales condition line. It allows for custom logic to be executed before the initial price is calculated.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalcSalesPriceInitialPrice(KVSKBASalesConditionLine: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"; Item: Record "Item"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnBeforeCalcSalesPriceInitialPrice', '', false, false)]
local procedure DoSomethingOnBeforeCalcSalesPriceInitialPrice(KVSKBASalesConditionLine: Record "KVSKBASalesConditionHeader"; PriceListLine: Record "Price List Line"; Item: Record "Item")
begin
end;
Parameters:
KVSKBASalesConditionLine
: Record of KVSKBASalesConditionHeader.PriceListLine
: Record of Price List Line.Item
: Record of Item.
Remarks: This event can be used to modify the initial price calculation logic before it is executed.
OnKVSKBAAddPricesHierachyOnBeforeFindCustomerPriceGroup(Record Customer, Code[20], Code[10], Boolean) :#
Summary: This event is triggered before finding the customer price group for a specific item category code. It allows for custom logic to be executed before the customer price group is determined.
[IntegrationEvent(false, false)]
local procedure OnKVSKBAAddPricesHierachyOnBeforeFindCustomerPriceGroup(Customer: Record "Customer"; ItemCategoryCode: Code[20]; var CustPriceGrCode: Code[10]; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnKVSKBAAddPricesHierachyOnBeforeFindCustomerPriceGroup', '', false, false)]
local procedure DoSomethingOnKVSKBAAddPricesHierachyOnBeforeFindCustomerPriceGroup(Customer: Record "Customer"; ItemCategoryCode: Code[20]; var CustPriceGrCode: Code[10]; var IsHandled: Boolean)
begin
end;
Parameters:
Customer
: Record of Customer.ItemCategoryCode
: Code representing the item category.CustPriceGrCode
: Code representing the customer price group.IsHandled
: Boolean value indicating if the event has been handled.
Remarks: This event can be used to modify the customer price group code before it is used in the calculation of prices. It is useful for scenarios where additional logic is needed to determine the appropriate customer price group based on the item category code and customer record.
OnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseAmountCurrency(Record KVSKBASalesConditionLine, Decimal, Decimal, Boolean) :#
Summary: This event is triggered to prevent a error when calculating sales dicount condition line with Calculation::"Amount (Currency)".
[IntegrationEvent(false, false)]
local procedure OnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseAmountCurrency(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; var PriceDecimal: Decimal; var DiscountDecimal: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseAmountCurrency', '', false, false)]
local procedure DoSomethingOnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseAmountCurrency(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; var PriceDecimal: Decimal; var DiscountDecimal: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
TempSalesConditionLine
: Temporary record of Sales Condition Line.PriceDecimal
: Decimal value representing the price.DiscountDecimal
: Decimal value representing the discount.IsHandled
: Boolean value indicating if the event has been handled.
OnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseElse(Record KVSKBASalesConditionLine, Decimal, Decimal, Boolean) :#
Summary: This event is triggered when calculating sales condition line values for a case where the Sales Condition Line is set to a specific discount. It allows for custom logic to be executed when the Sales Condition Line is set to a specific discount.
[IntegrationEvent(false, false)]
local procedure OnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseElse(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; var PriceDecimal: Decimal; var DiscountDecimal: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseElse', '', false, false)]
local procedure DoSomethingOnCalculateSalesConditionOnCaseTempSalesCondLineSetPercentandDiscountCaseElse(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; var PriceDecimal: Decimal; var DiscountDecimal: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
TempSalesConditionLine
: Temporary record of Sales Condition Line.PriceDecimal
: Decimal value representing the price.DiscountDecimal
: Decimal value representing the discount.
Remarks: This event can be used to modify the Sales Condition Line values before they are written to the database. It is useful for scenarios where additional calculations or adjustments are needed based on the Sales Condition Line values.
OnCalculateSalesConditionOnCaseTempSalesCondLineCalcValuesCaseElse(Record KVSKBASalesConditionLine, Decimal, Decimal) :#
Summary: This event is triggered when calculating sales condition line values for a case else where the Sales Condition Line is set to a specific price. It allows for custom logic to be executed when the Sales Condition Line is set to a specific price.
[IntegrationEvent(false, false)]
local procedure OnCalculateSalesConditionOnCaseTempSalesCondLineCalcValuesCaseElse(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; PriceDecimal: Decimal; DiscountDecimal: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalculateSalesConditionOnCaseTempSalesCondLineCalcValuesCaseElse', '', false, false)]
local procedure DoSomethingOnCalculateSalesConditionOnCaseTempSalesCondLineCalcValuesCaseElse(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; PriceDecimal: Decimal; DiscountDecimal: Decimal)
begin
end;
Parameters:
TempSalesConditionLine
: Temporary record of Sales Condition Line.PriceDecimal
: Decimal value representing the price.DiscountDecimal
: Decimal value representing the discount.
Remarks: This event can be used to modify the Sales Condition Line values before they are written to the database. It is useful for scenarios where additional calculations or adjustments are needed based on the Sales Condition Line values.
OnCalculateSalesConditionOnBeforeWriteSalesConditionLine(Record KVSKBASalesConditionLine, Record KVSKBASalesConditionLine) :#
Summary: This event is triggered before writing the Sales Condition Line record. It allows for custom logic to be executed before the record is written to the database.
[IntegrationEvent(false, false)]
local procedure OnCalculateSalesConditionOnBeforeWriteSalesConditionLine(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; SalesConditionLine: Record "KVSKBASalesConditionLine"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBASalesPriceLib", 'OnCalculateSalesConditionOnBeforeWriteSalesConditionLine', '', false, false)]
local procedure DoSomethingOnCalculateSalesConditionOnBeforeWriteSalesConditionLine(var TempSalesConditionLine: Record "KVSKBASalesConditionLine" temporary; SalesConditionLine: Record "KVSKBASalesConditionLine")
begin
end;
Parameters:
TempSalesConditionLine
: Temporary record of Sales Condition Line.SalesConditionLine
: Record of Sales Condition Line.
Remarks: This event can be used to modify the Sales Condition Line before it is written to the database. It is useful for scenarios where additional validation or processing is required before the record is saved.