KVSKBAInventorySummaryCalc#
Procedures#
GetAvailableInventorySummaryBase(Record KVSKBAInventorySummary) : Decimal#
Summary: Calculates the available inventory summary base for a given record.
procedure GetAvailableInventorySummaryBase(Rec: Record "KVSKBAInventorySummary"): Decimal
Parameters:
Rec: Record to calculate the available inventory summary base for
Returns: Available inventory quantity in base units, considering blocking and reservations
Remarks: Returns 0 if inventory is blocked or if bin/bin content movement is restricted. For bin-managed locations, considers warehouse activities and journals. For non-bin locations, considers reservation entries only.
CalculateWarehouseWorksheetQuantityToHandleBase(Record KVSKBAInventorySummary) : Decimal#
Summary: Calculates the warehouse worksheet quantity to handle base for a given inventory summary record.
procedure CalculateWarehouseWorksheetQuantityToHandleBase(InventorySummary: Record "KVSKBAInventorySummary"): Decimal
Parameters:
InventorySummary: Record to calculate the warehouse worksheet quantity for
Returns: Absolute quantity base that is planned to be handled in warehouse worksheets
Remarks: For items with warehouse tracking, considers warehouse item tracking lines. Otherwise, considers warehouse worksheet lines for picking operations.
CalculateItemJournalQuantity(Record KVSKBAInventorySummary, Boolean) : Decimal#
Summary: Calculates the item journal quantity for a given inventory summary record.
procedure CalculateItemJournalQuantity(InventorySummary: Record "KVSKBAInventorySummary"; ForTransfer: Boolean): Decimal
Parameters:
InventorySummary: Record to calculate the item journal quantity forForTransfer: Boolean indicating whether to calculate for transfer entries or negative adjustments
Returns: Absolute quantity base from item journal lines affecting the inventory
Remarks: Uses different calculation methods based on whether item tracking is enabled and whether bins are mandatory
CalculateWarehouseJournalQuantity(Record KVSKBAInventorySummary, Boolean) : Decimal#
Summary: Calculates the warehouse journal quantity for a given inventory summary record.
procedure CalculateWarehouseJournalQuantity(InventorySummary: Record "KVSKBAInventorySummary"; ForTransfer: Boolean): Decimal
Parameters:
InventorySummary: Record to calculate the warehouse journal quantity forForTransfer: Boolean indicating whether to calculate for movement entries or negative adjustments
Returns: Absolute quantity base from warehouse journal lines affecting the inventory
Remarks: Uses different calculation methods based on whether warehouse item tracking is enabled
Events#
OnBeforeCalculateWhseItemTrkgQtyBaseWksh(Record KVSKBAInventorySummary, Decimal, Boolean) :#
Summary: Event triggered before calculating warehouse item tracking quantity base from warehouse worksheet.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalculateWhseItemTrkgQtyBaseWksh(InventorySummary: Record "KVSKBAInventorySummary"; var CalcQty: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAInventorySummaryCalc", 'OnBeforeCalculateWhseItemTrkgQtyBaseWksh', '', false, false)]
local procedure DoSomethingOnBeforeCalculateWhseItemTrkgQtyBaseWksh(InventorySummary: Record "KVSKBAInventorySummary"; var CalcQty: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
InventorySummary: The inventory summary recordCalcQty: Calculated quantity to be returnedIsHandled: Boolean indicating if the calculation is handled by the event subscriber
Remarks: Subscribers can override the default calculation by setting IsHandled to true and providing a value for CalcQty
OnBeforeCalculateWhseWorksheetQtyToHdl(Record KVSKBAInventorySummary, Decimal, Boolean) :#
Summary: Event triggered before calculating warehouse worksheet quantity to handle base.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalculateWhseWorksheetQtyToHdl(InventorySummary: Record "KVSKBAInventorySummary"; var CalcQty: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAInventorySummaryCalc", 'OnBeforeCalculateWhseWorksheetQtyToHdl', '', false, false)]
local procedure DoSomethingOnBeforeCalculateWhseWorksheetQtyToHdl(InventorySummary: Record "KVSKBAInventorySummary"; var CalcQty: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
InventorySummary: The inventory summary recordCalcQty: The calculated quantity to be returnedIsHandled: Boolean indicating if the calculation is handled by the event subscriber
Remarks: Subscribers can override the default calculation by setting IsHandled to true and providing a value for CalcQty
OnBeforeCalculateWarehouseJournalQuantityItemTracking(Record KVSKBAInventorySummary, Boolean, Decimal, Boolean) :#
Summary: Event triggered before calculating warehouse journal quantity with item tracking.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalculateWarehouseJournalQuantityItemTracking(InventorySummary: Record "KVSKBAInventorySummary"; ForTransfer: Boolean; var CalcQty: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAInventorySummaryCalc", 'OnBeforeCalculateWarehouseJournalQuantityItemTracking', '', false, false)]
local procedure DoSomethingOnBeforeCalculateWarehouseJournalQuantityItemTracking(InventorySummary: Record "KVSKBAInventorySummary"; ForTransfer: Boolean; var CalcQty: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
InventorySummary: The inventory summary recordForTransfer: Boolean indicating whether the calculation is for transfer entriesCalcQty: The calculated quantity to be returnedIsHandled: Boolean indicating if the calculation is handled by the event subscriber
Remarks: Subscribers can override the default calculation by setting IsHandled to true and providing a value for CalcQty
OnBeforeCalculateWarehouseJournalQuantityWithoutItemTracking(Record KVSKBAInventorySummary, Boolean, Decimal, Boolean) :#
Summary: Event triggered before calculating warehouse journal quantity without item tracking.
[IntegrationEvent(false, false)]
local procedure OnBeforeCalculateWarehouseJournalQuantityWithoutItemTracking(InventorySummary: Record "KVSKBAInventorySummary"; ForTransfer: Boolean; var CalcQty: Decimal; var IsHandled: Boolean):
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAInventorySummaryCalc", 'OnBeforeCalculateWarehouseJournalQuantityWithoutItemTracking', '', false, false)]
local procedure DoSomethingOnBeforeCalculateWarehouseJournalQuantityWithoutItemTracking(InventorySummary: Record "KVSKBAInventorySummary"; ForTransfer: Boolean; var CalcQty: Decimal; var IsHandled: Boolean)
begin
end;
Parameters:
InventorySummary: The inventory summary recordForTransfer: Boolean indicating whether the calculation is for transfer entriesCalcQty: The calculated quantity to be returnedIsHandled: Boolean indicating if the calculation is handled by the event subscriber
Remarks: Subscribers can override the default calculation by setting IsHandled to true and providing a value for CalcQty