KVSKBAPurchPriceCalcMgt
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Procedures
CalcBestDirectUnitCost(Record KVSKBAPurchasePrice) :
Summary: Determines the best matching direct unit cost from the provided purchase price records and writes the result back into the PurchPrice variable.
procedure CalcBestDirectUnitCost(var PurchPrice: Record "KVSKBAPurchasePrice"):
Parameters:
PurchPrice: Temporary purchase price record set to iterate; receives the selected best price on return.
Remarks: Iterates all records in PurchPrice, applies VAT, unit of measure and currency conversions, and selects the lowest-cost entry respecting currency and variant code specificity. When no record satisfies the minimum quantity filter, the item's Last Direct Cost (or the SKU Last Direct Cost if PriceInSKU is true) is used as a fallback. Raises OnCalcBestDirectUnitCostOnBeforeNoPriceFound before the fallback and OnCalcBestDirectUnitCostOnAfterSetUnitCost after.
CalcBestLineDisc(Record KVSKBAPurchaseLineDiscount) :
Summary: Determines the best matching line discount from the provided purchase line discount records and writes the result back into the PurchLineDisc variable.
procedure CalcBestLineDisc(var PurchLineDisc: Record "KVSKBAPurchaseLineDiscount"):
Parameters:
PurchLineDisc: Temporary purchase line discount record set to iterate; receives the selected best discount on return.
Remarks: Iterates all records in PurchLineDisc and selects the highest discount percentage respecting minimum quantity, currency code and variant code specificity. If no record matches, the default discount (0 %) descended from the item is used.
FindPurchPrice(Record KVSKBAPurchasePrice, Code[20], Code[20], Code[10], Code[10], Code[10], Date, Boolean, Code[10], Record KVSKBAPurchaseConditionLine, Code[10]) :
Summary: Fills the ToPurchPrice temporary table with all applicable purchase prices for the given combination of vendor, item, date, currency and unit of measure.
procedure FindPurchPrice(var ToPurchPrice: Record "KVSKBAPurchasePrice"; VendorNo: Code[20]; ItemNo: Code[20]; VariantCode: Code[10]; UOM: Code[10]; CurrencyCode: Code[10]; StartingDate: Date; ShowAll: Boolean; RespCenterCode: Code[10]; var ToPurchCondLine: Record "KVSKBAPurchaseConditionLine"; ItemPriceGrCode: Code[10]):
Parameters:
ToPurchPrice: Temporary destination record that receives all matching purchase prices; cleared before filling unless called recursively.VendorNo: Vendor number to search prices for.ItemNo: Item number to search prices for.VariantCode: Item variant code filter.UOM: Unit of measure code filter.CurrencyCode: Currency code filter.StartingDate: Reference date; only prices valid on or before this date are included.ShowAll: When true, date, currency and unit of measure filters are ignored.RespCenterCode: Responsibility center code filter.ToPurchCondLine: Temporary condition lines record populated alongside the prices.ItemPriceGrCode: Item price group code; triggers a recursive call to include item price group prices.
Remarks: Hierarchy prices are added via AddPurchasePricesHierarchy. If an item price group code is provided, the function calls itself recursively once to also include item price group prices. Raises OnBeforeFindPurchPrice before the filter setup and OnAfterFindPurchPrice after the copy loop. ToPurchPrice must be temporary; an error is raised otherwise.
FindPurchLineDisc(Record KVSKBAPurchaseLineDiscount, Code[20], Code[20], Code[10], Code[10], Code[10], Date, Boolean, Decimal, Decimal, Code[10], Record KVSKBAPurchaseConditionLine, Decimal) :
Summary: Fills the ToPurchLineDisc temporary table with all applicable purchase line discounts for the given combination of vendor, item, date, currency and unit of measure.
procedure FindPurchLineDisc(var ToPurchLineDisc: Record "KVSKBAPurchaseLineDiscount"; VendorNo: Code[20]; ItemNo: Code[20]; VariantCode: Code[10]; UOM: Code[10]; CurrencyCode: Code[10]; StartingDate: Date; ShowAll: Boolean; QuantityPerUoM: Decimal; Quantity: Decimal; RespCenterCode: Code[10]; var ToPurchCondLine: Record "KVSKBAPurchaseConditionLine"; initialPrice: Decimal):
Parameters:
ToPurchLineDisc: Temporary destination record that receives all matching purchase line discounts; cleared before filling.VendorNo: Vendor number to search discounts for.ItemNo: Item number to search discounts for.VariantCode: Item variant code filter.UOM: Unit of measure code filter.CurrencyCode: Currency code filter.StartingDate: Reference date; only discounts valid on or before this date are included.ShowAll: When true, date, currency and unit of measure filters are ignored.QuantityPerUoM: Quantity per unit of measure from the document line.Quantity: Document line quantity.RespCenterCode: Responsibility center code filter.ToPurchCondLine: Temporary condition lines record populated alongside the discounts.initialPrice: Initial unit price used for condition line calculation.
Remarks: Hierarchy discounts are added via AddPurchaseLineDiscountHierarchy. Raises OnAfterFindPurchLineDisc after the copy loop. ToPurchLineDisc must be temporary; an error is raised otherwise.
SetCurrency(Code[10], Decimal, Date) :
Summary: Initialises the currency-related calculation variables for subsequent price and discount calculations.
procedure SetCurrency(CurrencyCode2: Code[10]; CurrencyFactor2: Decimal; ExchRateDate2: Date):
Parameters:
CurrencyCode2: The document currency code; pass an empty string for LCY.CurrencyFactor2: The currency exchange rate factor for the document.ExchRateDate2: The date used for the exchange rate, typically the posting or order date.
Remarks: When a non-empty currency code is provided, the corresponding Currency record is loaded and PricesInCurrency is set to true. When the currency code is blank, General Ledger Setup is loaded and GlobalCurrency is cleared.
SetVAT(Boolean, Decimal, Code[20]) :
Summary: Initialises the VAT-related calculation variables for subsequent price conversions.
procedure SetVAT(PriceInclVAT2: Boolean; VATPerCent2: Decimal; VATBusPostingGr2: Code[20]):
Parameters:
PriceInclVAT2: True if the document prices include VAT.VATPerCent2: The VAT percentage from the document line.VATBusPostingGr2: The VAT business posting group from the document header.
Remarks: These values are consumed by ConvertPriceToVAT to convert prices between including-VAT and excluding-VAT representations.
SetUoM(Decimal, Decimal) :
Summary: Initialises the quantity and unit of measure variables used for minimum quantity evaluation.
procedure SetUoM(Qty2: Decimal; QtyPerUoM2: Decimal):
Parameters:
Qty2: The document line quantity (pass the absolute value).QtyPerUoM2: The quantity per unit of measure from the document line.
Remarks: GlobalQty and GlobalQtyPerUOM are used by IsInMinQty and IsInPriceGrpMinQty to check whether a price or discount record's minimum quantity is satisfied.
SetLineDisc(Decimal) :
Summary: Initialises the line discount percentage variable used during the best direct unit cost calculation.
procedure SetLineDisc(LineDiscPerCent2: Decimal):
Parameters:
LineDiscPerCent2: The current line discount percentage from the document line.
Remarks: LineDiscPerCent is used in CalcLineAmount to compare competing prices when finding the best unit cost.
ConvertPriceToVAT(Boolean, Code[20], Code[20], Decimal) :
Summary: Converts a price between including-VAT and excluding-VAT representations based on the vendor and item VAT setup.
procedure ConvertPriceToVAT(FromPriceInclVAT: Boolean; FromVATProdPostingGr: Code[20]; FromVATBusPostingGr: Code[20]; var UnitPrice: Decimal):
Parameters:
FromPriceInclVAT: True if the source price includes VAT.FromVATProdPostingGr: The VAT product posting group of the source price.FromVATBusPostingGr: The VAT business posting group of the source price.UnitPrice: The price to convert; updated in place.
Remarks: When the source price includes VAT and the destination also includes VAT with a different VAT business posting group, an adjustment factor is applied. When the source includes VAT but the destination excludes VAT, the price is divided by the VAT rate factor. When the source excludes VAT but the destination includes VAT, the price is multiplied by the VAT rate factor. Raises OnBeforeConvertPriceToVAT before the VAT posting setup is used.
PurchHeaderStartDate(Record Purchase Header, Text[30]) : Date
Summary: Returns the reference date for purchase price lookups based on the document type of the purchase header.
procedure PurchHeaderStartDate(var PurchHeader: Record "Purchase Header"; var DateCaption: Text[30]): Date
Parameters:
PurchHeader: The purchase header providing the document type and relevant date fields.DateCaption: Returns the localised caption of the date field used as the reference date.
Returns: The posting date for invoices and credit memos; the order date for all other document types.
Remarks: DateCaption is set to the field caption of either "Posting Date" or "Order Date" and is used in validation error messages.
FindGenerallyPrice(Record Vendor, Code[10], Code[10], Decimal, Date, Code[10], Record Item, Code[10], Decimal, Code[10], Decimal, Code[10], Decimal) : Decimal
Summary: Finds and returns the best direct unit cost for an item, fully defined by explicit parameters rather than a document line.
procedure FindGenerallyPrice(PayToVendPar: Record "Vendor"; ResponsibilityCenterPar: Code[10]; CurrencyCodePar: Code[10]; CurrencyFactorPar: Decimal; DatePar: Date; LocationCodePar: Code[10]; ItemPar: Record "Item"; VariantCodePar: Code[10]; QtyPar: Decimal; UnitOfMeasureCodePar: Code[10]; QtyPerUnitOfMeasurePar: Decimal; ItemPriceGroupPar: Code[10]; QtyItemPriceGrpPar: Decimal): Decimal
Parameters:
PayToVendPar: The pay-to vendor record providing the vendor context; "No." must not be blank.ResponsibilityCenterPar: Responsibility center code used as a filter in the price lookup.CurrencyCodePar: Currency code for the price lookup; pass blank for LCY.CurrencyFactorPar: Exchange rate factor; required when CurrencyCodePar is non-blank.DatePar: Reference date for the price lookup.LocationCodePar: Location code used to find a matching SKU record.ItemPar: The item record to find a price for; "No." must not be blank.VariantCodePar: Item variant code filter.QtyPar: Document line quantity used for minimum quantity evaluation.UnitOfMeasureCodePar: Unit of measure code filter.QtyPerUnitOfMeasurePar: Quantity per unit of measure; must be positive and non-zero.ItemPriceGroupPar: Item price group code; passed to FindPurchPrice for recursive item price group lookup.QtyItemPriceGrpPar: Total quantity of the item price group used for minimum quantity evaluation.
Returns: The best direct unit cost found for the given parameters in the document currency.
Remarks: Validates all mandatory parameters before calling FindPurchPrice and CalcBestDirectUnitCost. Temporarily sets the QtyItemPriceGrpIsSet flag during calculation and resets it after.
FindGenerallyLineDisc(Record Vendor, Code[10], Code[10], Decimal, Date, Record Item, Code[10], Decimal, Code[10], Decimal, Decimal) : Decimal
Summary: Finds and returns the best line discount percentage for an item, fully defined by explicit parameters rather than a document line.
procedure FindGenerallyLineDisc(PayToVendPar: Record "Vendor"; ResponsibilityCenterPar: Code[10]; CurrencyCodePar: Code[10]; CurrencyFactorPar: Decimal; DatePar: Date; ItemPar: Record "Item"; VariantCodePar: Code[10]; QtyPar: Decimal; UnitOfMeasureCodePar: Code[10]; QtyPerUnitOfMeasurePar: Decimal; DirectUnitCostPar: Decimal): Decimal
Parameters:
PayToVendPar: The pay-to vendor record providing the vendor context; "No." must not be blank.ResponsibilityCenterPar: Responsibility center code used as a filter in the discount lookup.CurrencyCodePar: Currency code for the discount lookup; pass blank for LCY.CurrencyFactorPar: Exchange rate factor.DatePar: Reference date for the discount lookup.ItemPar: The item record to find a discount for; "No." must not be blank.VariantCodePar: Item variant code filter.QtyPar: Document line quantity used for minimum quantity evaluation.UnitOfMeasureCodePar: Unit of measure code filter.QtyPerUnitOfMeasurePar: Quantity per unit of measure; must be positive and non-zero.DirectUnitCostPar: The unit cost used for condition line calculation.
Returns: The best line discount percentage found for the given parameters.
Remarks: Validates mandatory parameters before calling FindPurchLineDisc and CalcBestLineDisc.
SetItem(Code[20]) :
Summary: Loads the item with the given number into the internal GlobalItem variable.
procedure SetItem(ItemNo: Code[20]):
Parameters:
ItemNo: The item number to load into GlobalItem.
Remarks: Used by external callers to pre-populate GlobalItem before invoking price calculation functions that depend on it.
SetPriceInSKU(Code[10], Code[20], Code[10]) :
Summary: Sets the PriceInSKU flag by looking up the stockkeeping unit for the given location, item and variant.
procedure SetPriceInSKU(LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]):
Parameters:
LocationCode: The location code for the SKU lookup.ItemNo: The item number for the SKU lookup.VariantCode: The variant code for the SKU lookup.
Remarks: Used by external callers to pre-populate PriceInSKU before invoking price calculation functions. PriceInSKU controls whether the SKU "Last Direct Cost" or the item "Last Direct Cost" is used as fallback in CalcBestDirectUnitCost.
Events
OnAfterFindJobJnlLinePrice(Record Job Journal Line, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after FindJobJnlLinePrice has completed for a job journal line.
[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 OnAfterFindJobJnlLinePrice(var JobJournalLine: Record "Job Journal Line"; var IsHandled: Boolean):
Parameters:
JobJournalLine: The job journal line after the price lookup.IsHandled: Set to true by a subscriber to prevent the standard Validate("Direct Unit Cost (LCY)") call.
Remarks: When IsHandled is false, the procedure calls JobJournalLine.Validate("Direct Unit Cost (LCY)") after this event.
OnAfterFindJobJnlLinePriceItem(Record Job Journal Line) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the item direct unit cost has been determined for a job journal line.
[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 OnAfterFindJobJnlLinePriceItem(var JobJournalLine: Record "Job Journal Line"):
Parameters:
JobJournalLine: The job journal line after the item price was applied.
Remarks: Subscribers can modify the journal line after the item price has been set but before Validate("Direct Unit Cost (LCY)") is called.
OnAfterFindJobJnlLinePriceResource(Record Job Journal Line) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the resource cost has been determined for a job journal line.
[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 OnAfterFindJobJnlLinePriceResource(var JobJournalLine: Record "Job Journal Line"):
Parameters:
JobJournalLine: The job journal line after the resource price was applied.
Remarks: Subscribers can modify the journal line after the resource cost has been set but before Validate("Direct Unit Cost (LCY)") is called.
OnAfterFindPurchPrice(Record KVSKBAPurchasePrice, Record KVSKBAPurchasePrice, Code[20], Code[20], Code[10], Code[10], Code[10], Date, Boolean, Decimal, Decimal) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after FindPurchPrice has finished populating the ToPurchPrice temporary table.
[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 OnAfterFindPurchPrice(var ToPurchPrice: Record "KVSKBAPurchasePrice"; FromPurchasePrice: Record "KVSKBAPurchasePrice"; VendorNo: Code[20]; ItemNo: Code[20]; VariantCode: Code[10]; UOM: Code[10]; CurrencyCode: Code[10]; StartingDate: Date; ShowAll: Boolean; Qty: Decimal; QtyPerUOM: Decimal):
Parameters:
ToPurchPrice: The temporary purchase price table that was populated.FromPurchasePrice: Internal working record used during the search.VendorNo: Vendor number used in the lookup.ItemNo: Item number used in the lookup.VariantCode: Variant code used in the lookup.UOM: Unit of measure code used in the lookup.CurrencyCode: Currency code used in the lookup.StartingDate: Reference date used in the lookup.ShowAll: Whether all filters were bypassed.Qty: Quantity used in the lookup.QtyPerUOM: Quantity per unit of measure used in the lookup.
Remarks: Subscribers can add, modify or remove entries in ToPurchPrice before CalcBestDirectUnitCost is called.
OnAfterFindPurchLinePrice(Record Purchase Line, Record Purchase Header, Record KVSKBAPurchasePrice, Integer) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the best direct unit cost has been determined for a purchase line.
[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 OnAfterFindPurchLinePrice(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var PurchasePrice: Record "KVSKBAPurchasePrice"; CalledByFieldNo: Integer):
Parameters:
PurchaseLine: The purchase line for which the price was found.PurchaseHeader: The purchase header providing vendor and date context.PurchasePrice: The best purchase price record selected.CalledByFieldNo: Field number of the field that triggered the price calculation.
Remarks: Subscribers can inspect or modify the resulting purchase price before it is written to the purchase line.
OnAfterFindPurchLineDisc(Record KVSKBAPurchaseLineDiscount, Record KVSKBAPurchaseLineDiscount, Code[20], Decimal, Decimal, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after FindPurchLineDisc has finished populating the ToPurchaseLineDiscount temporary table.
[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 OnAfterFindPurchLineDisc(var ToPurchaseLineDiscount: Record "KVSKBAPurchaseLineDiscount"; var FromPurchaseLineDiscount: Record "KVSKBAPurchaseLineDiscount"; ItemNo: Code[20]; QuantityPerUoM: Decimal; Quantity: Decimal; ShowAll: Boolean):
Parameters:
ToPurchaseLineDiscount: The temporary purchase line discount table that was populated.FromPurchaseLineDiscount: Internal working record used during the search.ItemNo: Item number used in the lookup.QuantityPerUoM: Quantity per unit of measure used in the lookup.Quantity: Quantity used in the lookup.ShowAll: Whether all filters were bypassed.
Remarks: Subscribers can add, modify or remove entries in ToPurchaseLineDiscount before CalcBestLineDisc is called.
OnAfterFindPurchLineLineDisc(Record Purchase Line, Record Purchase Header, Record KVSKBAPurchaseLineDiscount) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the best line discount has been determined for a purchase line.
[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 OnAfterFindPurchLineLineDisc(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var TempPurchLineDisc: Record "KVSKBAPurchaseLineDiscount" temporary):
Parameters:
PurchaseLine: The purchase line for which the discount was found.PurchaseHeader: The purchase header providing vendor and date context.TempPurchLineDisc: The temporary purchase line discount record selected as the best discount.
Remarks: Subscribers can inspect or modify the resulting discount before it is applied to the purchase line.
OnAfterFindReqLinePrice(Record Requisition Line, Record KVSKBAPurchasePrice, Integer) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the best direct unit cost has been determined for a requisition line.
[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 OnAfterFindReqLinePrice(var ReqLine: Record "Requisition Line"; var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary; CalledByFieldNo: Integer):
Parameters:
ReqLine: The requisition line for which the price was found.TempPurchasePrice: The temporary purchase price table after the best price selection.CalledByFieldNo: Field number of the field that triggered the price calculation.
Remarks: Subscribers can inspect or modify the purchase price before it is applied to the requisition line.
OnAfterFindReqLineDisc(Record Requisition Line) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the best line discount has been determined for a requisition line.
[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 OnAfterFindReqLineDisc(var ReqLine: Record "Requisition Line"):
Parameters:
ReqLine: The requisition line after the discount was applied.
Remarks: Subscribers can read or adjust the requisition line state after the discount has been set.
OnAfterGetPurchLinePrice(Record Purchase Header, Record Purchase Line, Record KVSKBAPurchasePrice) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after GetPurchLinePrice has applied the selected price to a purchase line.
[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 OnAfterGetPurchLinePrice(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary):
Parameters:
PurchaseHeader: The purchase header providing vendor and date context.PurchaseLine: The purchase line whose direct unit cost was updated.TempPurchasePrice: The temporary purchase price record that was applied.
Remarks: Subscribers can adjust the purchase line after the price has been set.
OnAfterJobJnlLineFindResCost(Record Job Journal Line, Integer, Record Resource Cost, Record Currency, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the resource cost has been found for a job journal line.
[IntegrationEvent(false, false)]
[Obsolete('Use OnAfterJobJnlLineFindResCost2 instead', '24.3')]
local procedure OnAfterJobJnlLineFindResCost(var JobJournalLine: Record "Job Journal Line"; CalledByFieldNo: Integer; var ResourceCost: Record "Resource Cost"; Currency: Record "Currency"; IsHandled: Boolean):
Parameters:
JobJournalLine: The job journal line being priced.CalledByFieldNo: Field number of the field that triggered the price calculation.ResourceCost: The resource cost record that was found.Currency: The currency record for the job journal line.IsHandled: When true, the standard resource cost application is skipped.
Remarks: This event is obsolete; use OnAfterJobJnlLineFindResCost2 instead. Note: IsHandled is passed by value (not by reference) in this version.
OnAfterJobJnlLineFindResCost2(Record Job Journal Line, Integer, Record Resource Cost, Record Currency, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the resource cost has been found for a job journal line.
[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 OnAfterJobJnlLineFindResCost2(var JobJournalLine: Record "Job Journal Line"; CalledByFieldNo: Integer; var ResourceCost: Record "Resource Cost"; Currency: Record "Currency"; var IsHandled: Boolean):
Parameters:
JobJournalLine: The job journal line being priced.CalledByFieldNo: Field number of the field that triggered the price calculation.ResourceCost: The resource cost record that was found.Currency: The currency record for the job journal line.IsHandled: Set to true to skip the standard resource cost application to the journal line.
Remarks: This is the replacement for the obsolete OnAfterJobJnlLineFindResCost event; IsHandled is now passed by reference.
OnAfterJobPlanningLineFindResCost(Record Job Planning Line, Integer, Record Resource Cost, Record Currency, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the resource cost has been found for a job planning line.
[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 OnAfterJobPlanningLineFindResCost(var JobPlanningLine: Record "Job Planning Line"; CalledByFieldNo: Integer; var ResourceCost: Record "Resource Cost"; Currency: Record "Currency"; var IsHandled: Boolean):
Parameters:
JobPlanningLine: The job planning line being priced.CalledByFieldNo: Field number of the field that triggered the price calculation.ResourceCost: The resource cost record that was found.Currency: The currency record for the job planning line.IsHandled: Set to true to skip the standard resource cost application to the planning line.
Remarks: Subscribers can apply their own resource cost logic when IsHandled is set to true.
OnAfterPurchLineLineDiscExists(Record Purchase Line) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the purchase line discount existence check has been completed.
[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 OnAfterPurchLineLineDiscExists(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line after the discount existence check.
Remarks: Subscribers can read or adjust the purchase line state after the check.
OnAfterPurchLinePriceExists(Record Purchase Line) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the purchase line price existence check has been completed.
[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 OnAfterPurchLinePriceExists(var PurchaseLine: Record "Purchase Line"):
Parameters:
PurchaseLine: The purchase line after the price existence check.
Remarks: Subscribers can read or adjust the purchase line state after the check.
OnBeforeConvertPriceToVAT(Record VAT Posting Setup) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before ConvertPriceToVAT reads the VAT posting 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')]
[IntegrationEvent(false, false)]
local procedure OnBeforeConvertPriceToVAT(var VATPostingSetup: Record "VAT Posting Setup"):
Parameters:
VATPostingSetup: The VAT posting setup record loaded for the price conversion.
Remarks: Subscribers can modify the VATPostingSetup record before its values are used for the VAT conversion.
OnBeforeFindItemJnlLinePrice(Record Item Journal Line, Integer, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindItemJnlLinePrice starts the price lookup for an item journal line.
[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 OnBeforeFindItemJnlLinePrice(var ItemJournalLine: Record "Item Journal Line"; CalledByFieldNo: Integer; var IsHandled: Boolean):
Parameters:
ItemJournalLine: The item journal line for which a price is being looked up.CalledByFieldNo: Field number of the field that triggered the price calculation.IsHandled: Set to true to skip the standard item journal line price lookup entirely.
Remarks: When IsHandled is set to true by a subscriber, the standard lookup is skipped.
OnBeforeFindJobJnlLinePrice(Record Job Journal Line, Integer, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindJobJnlLinePrice starts the price lookup for a job journal line.
[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 OnBeforeFindJobJnlLinePrice(var JobJournalLine: Record "Job Journal Line"; CalledByFieldNo: Integer; var IsHandled: Boolean):
Parameters:
JobJournalLine: The job journal line for which a price is being looked up.CalledByFieldNo: Field number of the field that triggered the price calculation.IsHandled: Set to true to skip the standard job journal line price lookup entirely.
Remarks: When IsHandled is set to true by a subscriber, the standard lookup is skipped.
OnBeforeJobJnlLineFindResCost(Record Job Journal Line, Integer, Record Resource Cost) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before the resource cost is looked up for a job journal line.
[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 OnBeforeJobJnlLineFindResCost(var JobJournalLine: Record "Job Journal Line"; CalledByFieldNo: Integer; var ResourceCost: Record "Resource Cost"):
Parameters:
JobJournalLine: The job journal line for which the resource cost is being determined.CalledByFieldNo: Field number of the field that triggered the price calculation.ResourceCost: The resource cost record initialised with Code and Work Type Code; can be modified by subscribers.
Remarks: Subscribers can pre-populate or modify ResourceCost before the standard Resource-Find Cost codeunit is run.
OnBeforeFindJobPlanningLinePrice(Record Job Planning Line, Integer, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindJobPlanningLinePrice starts the price lookup for a job planning line.
[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 OnBeforeFindJobPlanningLinePrice(var JobPlanningLine: Record "Job Planning Line"; CalledByFieldNo: Integer; var IsHandled: Boolean):
Parameters:
JobPlanningLine: The job planning line for which a price is being looked up.CalledByFieldNo: Field number of the field that triggered the price calculation.IsHandled: Set to true to skip the standard job planning line price lookup entirely.
Remarks: When IsHandled is set to true by a subscriber, the standard lookup is skipped.
OnBeforeFindPurchPrice(Record KVSKBAPurchasePrice, Record KVSKBAPurchasePrice, Code[20], Code[20], Code[10], Code[10], Code[10], Date, Boolean, Decimal, Decimal) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindPurchPrice starts populating the ToPurchPrice table.
[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 OnBeforeFindPurchPrice(var ToPurchPrice: Record "KVSKBAPurchasePrice"; var FromPurchasePrice: Record "KVSKBAPurchasePrice"; var VendorNo: Code[20]; var ItemNo: Code[20]; var VariantCode: Code[10]; var UOM: Code[10]; var CurrencyCode: Code[10]; var StartingDate: Date; var ShowAll: Boolean; var Qty: Decimal; var QtyPerUOM: Decimal):
Parameters:
ToPurchPrice: The temporary destination purchase price table (empty at this point).FromPurchasePrice: Internal working record used during the search.VendorNo: Vendor number; can be modified.ItemNo: Item number; can be modified.VariantCode: Variant code; can be modified.UOM: Unit of measure code; can be modified.CurrencyCode: Currency code; can be modified.StartingDate: Reference date; can be modified.ShowAll: Whether all filters are bypassed; can be modified.Qty: Quantity; can be modified.QtyPerUOM: Quantity per unit of measure; can be modified.
Remarks: Subscribers can modify the lookup parameters before the filter setup begins.
OnBeforeFindStdItemJnlLinePrice(Record Standard Item Journal Line, Integer, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindStdItemJnlLinePrice starts the price lookup for a standard item journal line.
[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 OnBeforeFindStdItemJnlLinePrice(var StandardItemJnlLine: Record "Standard Item Journal Line"; CalledByFieldNo: Integer; var IsHandled: Boolean):
Parameters:
StandardItemJnlLine: The standard item journal line for which a price is being looked up.CalledByFieldNo: Field number of the field that triggered the price calculation.IsHandled: Set to true to skip the standard lookup entirely.
Remarks: When IsHandled is set to true by a subscriber, the standard lookup is skipped.
OnBeforeFindReqLinePrice(Record Requisition Line, Integer, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindReqLinePrice starts the price lookup for a requisition line.
[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 OnBeforeFindReqLinePrice(var RequisitionLine: Record "Requisition Line"; CalledByFieldNo: Integer; var IsHandled: Boolean):
Parameters:
RequisitionLine: The requisition line for which a price is being looked up.CalledByFieldNo: Field number of the field that triggered the price calculation.IsHandled: Set to true to skip the standard requisition line price lookup entirely.
Remarks: When IsHandled is set to true by a subscriber, the standard lookup is skipped.
OnBeforeFindReqLinePriceOnCaseItem(Record KVSKBAPurchasePrice, Record Requisition Line, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindPurchPrice is called for the item case inside FindReqLinePrice.
[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 OnBeforeFindReqLinePriceOnCaseItem(var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary; var ReqLine: Record "Requisition Line"; var IsHandled: Boolean):
Parameters:
TempPurchasePrice: The temporary destination purchase price table.ReqLine: The requisition line being priced.IsHandled: Set to true to skip the standard FindPurchPrice call for this requisition line.
Remarks: Subscribers can provide their own prices in TempPurchasePrice and set IsHandled to true.
OnBeforeFindReqLineDisc(Record Requisition Line, Record KVSKBAPurchaseLineDiscount, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before the standard FindPurchLineDisc call inside FindReqLineDisc.
[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 OnBeforeFindReqLineDisc(var ReqLine: Record "Requisition Line"; var TempPurchaseLineDiscount: Record "KVSKBAPurchaseLineDiscount" temporary; var IsHandled: Boolean):
Parameters:
ReqLine: The requisition line for which a discount is being looked up.TempPurchaseLineDiscount: The temporary destination discount table.IsHandled: Set to true to skip the standard FindPurchLineDisc call.
Remarks: Subscribers can provide their own discounts in TempPurchaseLineDiscount and set IsHandled to true.
OnBeforeFindPurchLinePrice(Record Purchase Line, Record Purchase Header, Integer, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before FindPurchLinePrice starts the price lookup for a purchase line.
[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 OnBeforeFindPurchLinePrice(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; CalledByFieldNo: Integer; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line for which a price is being looked up.PurchaseHeader: The purchase header providing vendor and date context.CalledByFieldNo: Field number of the field that triggered the price calculation.IsHandled: Set to true to skip the standard purchase line price lookup entirely.
Remarks: When IsHandled is set to true by a subscriber, the standard lookup is skipped.
OnBeforePurchLinePriceExists(Record Purchase Line, Record Purchase Header, Record KVSKBAPurchasePrice, Boolean, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before the standard FindPurchPrice call inside PurchLinePriceExists.
[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 OnBeforePurchLinePriceExists(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary; ShowAll: Boolean; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line being checked for prices.PurchaseHeader: The purchase header providing vendor and date context.TempPurchasePrice: The temporary destination price table (empty at this point).ShowAll: Whether all filters are bypassed.IsHandled: Set to true to skip the standard FindPurchPrice call.
Remarks: Subscribers can provide their own prices in TempPurchasePrice and set IsHandled to true.
OnBeforePurchLineLineDiscExists(Record Purchase Line, Record Purchase Header, Record KVSKBAPurchaseLineDiscount, Boolean, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before the standard FindPurchLineDisc call inside PurchLineLineDiscExists.
[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 OnBeforePurchLineLineDiscExists(var PurchaseLine: Record "Purchase Line"; var PurchaseHeader: Record "Purchase Header"; var TempPurchLineDisc: Record "KVSKBAPurchaseLineDiscount" temporary; ShowAll: Boolean; var IsHandled: Boolean):
Parameters:
PurchaseLine: The purchase line being checked for discounts.PurchaseHeader: The purchase header providing vendor and date context.TempPurchLineDisc: The temporary destination discount table (empty at this point).ShowAll: Whether all filters are bypassed.IsHandled: Set to true to skip the standard FindPurchLineDisc call.
Remarks: Subscribers can provide their own discounts in TempPurchLineDisc and set IsHandled to true.
OnCalcBestDirectUnitCostOnAfterSetUnitCost(Record KVSKBAPurchasePrice) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the unit cost has been set from the fallback price (item or SKU Last Direct Cost) in CalcBestDirectUnitCost.
[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 OnCalcBestDirectUnitCostOnAfterSetUnitCost(var PurchasePrice: Record "KVSKBAPurchasePrice"):
Parameters:
PurchasePrice: The purchase price record after the fallback cost has been applied.
Remarks: Raised only when no price agreement record satisfies the minimum quantity filter. Subscribers can override the fallback direct unit cost before it is written back to the caller.
OnCalcBestDirectUnitCostOnBeforeNoPriceFound(Record KVSKBAPurchasePrice, Record Item, Boolean) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before CalcBestDirectUnitCost applies the fallback price when no price agreement is found.
[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 OnCalcBestDirectUnitCostOnBeforeNoPriceFound(var PurchasePrice: Record "KVSKBAPurchasePrice"; Item: Record "Item"; var IsHandled: Boolean):
Parameters:
PurchasePrice: The purchase price record that will receive the fallback cost.Item: The item record used as source for the fallback Last Direct Cost.IsHandled: Set to true to skip the standard fallback logic and provide the cost in PurchasePrice yourself.
Remarks: When IsHandled is true, the standard assignment of SKU or item Last Direct Cost is skipped.
OnGetPurchLinePriceOnAfterLookup(Record Purchase Header, Record Purchase Line, Record KVSKBAPurchasePrice) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the user has selected a price in the purchase price lookup page.
[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 OnGetPurchLinePriceOnAfterLookup(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary):
Parameters:
PurchaseHeader: The purchase header providing vendor and date context.PurchaseLine: The purchase line for which the price was looked up.TempPurchasePrice: The selected purchase price record.
Remarks: Subscribers can adjust the selected TempPurchasePrice before VAT and currency conversions are applied.
OnGetPurchLineLineDiscOnAfterLookup(Record Purchase Header, Record Purchase Line, Record KVSKBAPurchaseLineDiscount) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised after the user has selected a discount in the purchase line discount lookup page.
[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 OnGetPurchLineLineDiscOnAfterLookup(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; var TempPurchaseLineDiscount: Record "KVSKBAPurchaseLineDiscount" temporary):
Parameters:
PurchaseHeader: The purchase header providing vendor and date context.PurchaseLine: The purchase line for which the discount was looked up.TempPurchaseLineDiscount: The selected purchase line discount record.
Remarks: Subscribers can adjust the selected TempPurchaseLineDiscount before it is validated against the purchase line constraints.
OnFindItemJnlLinePriceOnBeforeCalcBestDirectUnitCost(Record Item Journal Line, Record KVSKBAPurchasePrice) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before CalcBestDirectUnitCost is called for an item journal line price lookup.
[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 OnFindItemJnlLinePriceOnBeforeCalcBestDirectUnitCost(var ItemJournalLine: Record "Item Journal Line"; var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary):
Parameters:
ItemJournalLine: The item journal line for which the price is being calculated.TempPurchasePrice: The temporary purchase price table populated by FindPurchPrice.
Remarks: Subscribers can add, modify or remove entries in TempPurchasePrice before the best price is selected.
OnFindJobJnlLinePriceOnBeforeCalcBestDirectUnitCost(Record Job Journal Line, Record KVSKBAPurchasePrice) :
OBSOLETE
This Element will be removed or changed with a future Version of the App.
Summary: Integration event raised before CalcBestDirectUnitCost is called for a job journal line price lookup.
[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 OnFindJobJnlLinePriceOnBeforeCalcBestDirectUnitCost(var JobJournalLine: Record "Job Journal Line"; var TempPurchasePrice: Record "KVSKBAPurchasePrice" temporary):
Parameters:
JobJournalLine: The job journal line for which the price is being calculated.TempPurchasePrice: The temporary purchase price table populated by FindPurchPrice.
Remarks: Subscribers can add, modify or remove entries in TempPurchasePrice before the best price is selected.