KVSTRDCalcUnitCostMgt#
Procedures#
TestCalcUnitCostsIsActive() :#
Summary: Tests if the calculated unit costs functionality is active.
procedure TestCalcUnitCostsIsActive():
CalculateCalcUnitCost(Record Item) :#
Summary: Calculates the calculated unit cost for a specific item.
procedure CalculateCalcUnitCost(var Item: Record "Item"):
Parameters:
Item: The item record for which the costs are to be calculated.
CalculateCalcUnitCost(Record Item Variant) :#
Summary: Calculates the calculated unit cost for a specific item variant.
procedure CalculateCalcUnitCost(var ItemVariant: Record "Item Variant"):
Parameters:
ItemVariant: The item variant record for which the costs are to be calculated.
CalculateCalcUnitCost(Record Stockkeeping Unit) :#
Summary: Calculates the calculated unit cost for a specific stockkeeping unit.
procedure CalculateCalcUnitCost(var StockkeepingUnit: Record "Stockkeeping Unit"):
Parameters:
StockkeepingUnit: The stockkeeping unit record for which the costs are to be calculated.
KVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc(Record KVSKBASalesConditionHeader, Record KVSKBASalesPriceWorksheet, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPriceWorksheet: Record "KVSKBASalesPriceWorksheet"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPriceWorksheet: Record "KVSKBASalesPriceWorksheet"; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib(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('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; QuantityPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQuantityPerUOM: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; QuantityPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQuantityPerUOM: Decimal; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean)
begin
end;
Events#
KVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc(Record KVSKBASalesConditionHeader, Record KVSKBASalesPriceWorksheet, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPriceWorksheet: Record "KVSKBASalesPriceWorksheet"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnGetConditionOnAfterSetFilterSalesCondHeaderKVSKBASalesPriceWkshCalc(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPriceWorksheet: Record "KVSKBASalesPriceWorksheet"; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnCalcSalesCondNoInSalesPriceOnBeforeCheckAllowBaseofCalculationKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib(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('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; QuantityPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQuantityPerUOM: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnCalcSalesPriceInitialPriceOnCaseBaseofCalculationOnBeforeCaseElseKVSKBASalesPriceLib(KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; Item: Record "Item"; VariantCode: Code[10]; LocationCode: Code[10]; Quantity: Decimal; QuantityPerUOM: Decimal; var InitialPrice: Decimal; var InitialPriceCurrencyCode: Code[10]; var InitialPriceCurrencyFactor: Decimal; var InitialPriceExchRateDate: Date; var InitialPriceUOMCode: Code[10]; var InitialPriceQuantityPerUOM: Decimal; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib(Record KVSKBASalesConditionHeader, Record KVSKBASalesPrice, Boolean) :#
Obsolete
This Element will be removed or changed with a future Version of the App.
[Obsolete('Will be deleted with the new pricing experience.', '21.5')]
[IntegrationEvent(false, false)]
procedure KVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeOnLookupSalesCondNoInSalesPriceOnAfterSetFilterKVSKBASalesPriceLib(var KVSKBASalesConditionHeader: Record "KVSKBASalesConditionHeader"; KVSKBASalesPrice: Record "KVSKBASalesPrice"; var IsHandled: Boolean)
begin
end;
KVSTRDOnBeforeInsertCalcUnitCostEntry(Record KVSTRDCalcUnitCostEntry, Record KVSTRDCalcUnitCostTemplAssignm, Record KVSTRDCalcUnitCostTemplHeader) :#
Summary: This event is raised before a new CalcUnitCostEntry is inserted. It allows to implement custom logic before the insertion.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeInsertCalcUnitCostEntry(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; var CalcUnitCostTemplAssignment: Record "KVSTRDCalcUnitCostTemplAssignm"; var CalcUnitCostTemplHeader: Record "KVSTRDCalcUnitCostTemplHeader"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnBeforeInsertCalcUnitCostEntry', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeInsertCalcUnitCostEntry(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; var CalcUnitCostTemplAssignment: Record "KVSTRDCalcUnitCostTemplAssignm"; var CalcUnitCostTemplHeader: Record "KVSTRDCalcUnitCostTemplHeader")
begin
end;
Parameters:
CalcUnitCostEntry: The CalcUnitCostEntry record that is about to be inserted.CalcUnitCostTemplAssignment: The CalcUnitCostTemplAssignment record associated with the CalcUnitCostEntry.CalcUnitCostTemplHeader: The CalcUnitCostTemplHeader record associated with the CalcUnitCostEntry.
KVSTRDOnAfterGetBaseCosts(Record KVSTRDCalcUnitCostEntry, Boolean, Decimal, Decimal) :#
Summary: This event is raised after the base costs are retrieved for a CalcUnitCostEntry. It allows to modify the base price and discount values before they are used.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterGetBaseCosts(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; var IsSKU: Boolean; var BasePrice: Decimal; var BaseDiscount: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnAfterGetBaseCosts', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterGetBaseCosts(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; var IsSKU: Boolean; var BasePrice: Decimal; var BaseDiscount: Decimal)
begin
end;
Parameters:
CalcUnitCostEntry: The CalcUnitCostEntry record for which the base costs are being retrieved.IsSKU: Specifies if the base costs are for a Stockkeeping Unit.BasePrice: The base price that has been retrieved.BaseDiscount: The base discount that has been retrieved.
KVSTRDOnAfterCalculateBaseCostLastCalculatedAmount(Record KVSTRDCalcUnitCostEntry, Decimal) :#
Summary: This event is raised after the last calculated amount for base costs is determined. It allows to modify the last calculated amount before it is used in further calculations.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterCalculateBaseCostLastCalculatedAmount(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; var LastCalculatedAmount: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnAfterCalculateBaseCostLastCalculatedAmount', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterCalculateBaseCostLastCalculatedAmount(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; var LastCalculatedAmount: Decimal)
begin
end;
Parameters:
CalcUnitCostEntry: The CalcUnitCostEntry record for which the last calculated amount is being determined.LastCalculatedAmount: The last calculated amount that has been determined.
KVSTRDOnAfterSetCalcUnitCostFilterForItem(Record Item) :#
Summary: This event is raised after the filter for calculating unit costs is set for an Item record. It allows to implement custom logic after the filter has been applied.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterSetCalcUnitCostFilterForItem(var Item: Record "Item"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnAfterSetCalcUnitCostFilterForItem', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterSetCalcUnitCostFilterForItem(var Item: Record "Item")
begin
end;
Parameters:
Item: The Item record for which the filter is set.
KVSTRDOnAfterSetCalcUnitCostFilterForItemVariant(Record Item Variant) :#
Summary: This event is raised after the filter for calculating unit costs is set for an Item Variant record. It allows to implement custom logic after the filter has been applied.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterSetCalcUnitCostFilterForItemVariant(var ItemVariant: Record "Item Variant"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnAfterSetCalcUnitCostFilterForItemVariant', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterSetCalcUnitCostFilterForItemVariant(var ItemVariant: Record "Item Variant")
begin
end;
Parameters:
ItemVariant: The Item Variant record for which the filter is set.
KVSTRDOnAfterSetCalcUnitCostFilterForStockkeepingUnit(Record Stockkeeping Unit) :#
Summary: This event is raised after the filter for calculating unit costs is set for a Stockkeeping Unit record. It allows to implement custom logic after the filter has been applied.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterSetCalcUnitCostFilterForStockkeepingUnit(var StockkeepingUnit: Record "Stockkeeping Unit"):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnAfterSetCalcUnitCostFilterForStockkeepingUnit', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterSetCalcUnitCostFilterForStockkeepingUnit(var StockkeepingUnit: Record "Stockkeeping Unit")
begin
end;
Parameters:
StockkeepingUnit: The Stockkeeping Unit record for which the filter is set.
KVSTRDOnGetCalcUnitCostFromItem(Record Item, Boolean, Decimal) :#
Summary: This event is raised to retrieve the calculated unit cost from an Item record. It allows to implement custom logic to determine the calculated unit cost.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnGetCalcUnitCostFromItem(var Item: Record "Item"; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnGetCalcUnitCostFromItem', '', false, false)]
local procedure DoSomethingKVSTRDOnGetCalcUnitCostFromItem(var Item: Record "Item"; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal)
begin
end;
Parameters:
Item: The Item record from which the calculated unit cost is retrieved.isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.CalcUnitCostLCY: The calculated unit cost in local currency that is retrieved from the Item record.
KVSTRDOnGetCalcUnitCostFromItemVariant(Record Item Variant, Boolean, Decimal) :#
Summary: This event is raised to retrieve the calculated unit cost from an Item Variant record. It allows to implement custom logic to determine the calculated unit cost.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnGetCalcUnitCostFromItemVariant(var ItemVariant: Record "Item Variant"; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnGetCalcUnitCostFromItemVariant', '', false, false)]
local procedure DoSomethingKVSTRDOnGetCalcUnitCostFromItemVariant(var ItemVariant: Record "Item Variant"; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal)
begin
end;
Parameters:
ItemVariant: The Item Variant record from which the calculated unit cost is retrieved.isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.CalcUnitCostLCY: The calculated unit cost in local currency that is retrieved from the Item Variant record.
KVSTRDOnGetCalcUnitCostFromStockkeepingUnit(Record Stockkeeping Unit, Boolean, Decimal) :#
Summary: This event is raised to retrieve the calculated unit cost from a Stockkeeping Unit record. It allows to implement custom logic to determine the calculated unit cost.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnGetCalcUnitCostFromStockkeepingUnit(var StockkeepingUnit: Record "Stockkeeping Unit"; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnGetCalcUnitCostFromStockkeepingUnit', '', false, false)]
local procedure DoSomethingKVSTRDOnGetCalcUnitCostFromStockkeepingUnit(var StockkeepingUnit: Record "Stockkeeping Unit"; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal)
begin
end;
Parameters:
StockkeepingUnit: The Stockkeeping Unit record from which the calculated unit cost is retrieved.isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.CalcUnitCostLCY: The calculated unit cost in local currency that is retrieved from the Stockkeeping Unit record.
KVSTRDOnGetGetUserDefinedCalcUnitCost(Record KVSTRDCalcUnitCostEntry, Text, Code[20], Code[10], Code[10], Code[20], Code[50], Boolean, Decimal) :#
Summary: This event is raised after all filters have been applied to find a user-defined calculated unit cost.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnGetGetUserDefinedCalcUnitCost(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; UserID: Text; ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; VendorNo: Code[20]; TemplateCode: Code[50]; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnGetGetUserDefinedCalcUnitCost', '', false, false)]
local procedure DoSomethingKVSTRDOnGetGetUserDefinedCalcUnitCost(var CalcUnitCostEntry: Record "KVSTRDCalcUnitCostEntry"; UserID: Text; ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; VendorNo: Code[20]; TemplateCode: Code[50]; var IsHandled: Boolean; var CalcUnitCostLCY: Decimal)
begin
end;
Parameters:
CalcUnitCostEntry: The CalcUnitCostEntry record that is being processed.UserID: The user ID for which the calculated unit cost is being retrieved.ItemNo: The item number for which the calculated unit cost is being retrieved.VariantCode: The variant code for the item, if applicable.LocationCode: The location code for which the calculated unit cost is being retrieved.VendorNo: The vendor number for which the calculated unit cost is being retrieved.TemplateCode: The template code for which the calculated unit cost is being retrieved.isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.CalcUnitCostLCY: The calculated unit cost in local currency that is retrieved from the user-defined calculation.
KVSTRDOnInsertCalcUnitCostDetailEntryOnAfterGetCurrencyFactor(Record KVSTRDCalcUnitCostDetailEntry, Decimal) :#
Summary: This event is raised after the currency factor is retrieved for a CalcUnitCostDetailEntry and before it is inserted. It allows to implement custom logic after the currency factor has been determined.
[IntegrationEvent(false, false)]
local procedure KVSTRDOnInsertCalcUnitCostDetailEntryOnAfterGetCurrencyFactor(var CalcUnitCostDetailEntry: Record "KVSTRDCalcUnitCostDetailEntry"; var CurrencyFactor: Decimal):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDCalcUnitCostMgt", 'KVSTRDOnInsertCalcUnitCostDetailEntryOnAfterGetCurrencyFactor', '', false, false)]
local procedure DoSomethingKVSTRDOnInsertCalcUnitCostDetailEntryOnAfterGetCurrencyFactor(var CalcUnitCostDetailEntry: Record "KVSTRDCalcUnitCostDetailEntry"; var CurrencyFactor: Decimal)
begin
end;
Parameters:
CalcUnitCostDetailEntry: The CalcUnitCostDetailEntry record for which the currency factor is being retrieved.CurrencyFactor: The currency factor that has been retrieved for the CalcUnitCostDetailEntry.