Skip to content

KVSTRDInventoryMultipleMgt#

Procedures#

CheckSalesLineQtyIsInvtMultiple(Record Sales Line, Integer, Boolean) :#

Summary: Checks if the item in the sales line has set up an inventory multiply quantity. If so, the quantity entered in the sales line is checked for a multiple of this.

procedure CheckSalesLineQtyIsInvtMultiple(SalesLine: Record "Sales Line"; FieldNo: Integer; ShowError: Boolean): 

Parameters:

  • SalesLine: The current sales line record, for which the check should be performed.
  • FieldNo: The current field number from the sales line. Which quantity field is checked and what any messages look like depends on this value.
  • ShowError: If this parameter is set to true, an error is thrown and the processing stops. Otherwise only a message is shown.

RoundSalesLineQtyToInventoryMultiple(Record Sales Line, Integer) :#

Summary: Rounds the quantity on a sales line to the nearest inventory multiple.

procedure RoundSalesLineQtyToInventoryMultiple(var SalesLine: Record "Sales Line"; FieldNo: Integer): 

Parameters:

  • SalesLine: The sales line record.
  • FieldNo: The field number of the quantity field to round. Currently supported are: Quantity, Qty. to Ship

Events#

KVSTRDOnAfterRoundSalesLineQtyToInvtMultiple(Record Sales Line, Decimal, Decimal) :#

Summary: This event is raised after the Sales Line quantity has been rounded to the inventory multiple. It allows additional processing after the rounding operation.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterRoundSalesLineQtyToInvtMultiple(var SalesLine: Record "Sales Line"; Qty: Decimal; NewQty: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnAfterRoundSalesLineQtyToInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterRoundSalesLineQtyToInvtMultiple(var SalesLine: Record "Sales Line"; Qty: Decimal; NewQty: Decimal)
begin
end;

Parameters:

  • SalesLine: The Sales Line record that has been modified.
  • Qty: The original quantity before rounding.
  • NewQty: The new quantity after rounding to the inventory multiple.

KVSTRDOnBeforeCheckDocumentTypeInCheckSalesLineQtyIsInvtMultiple(Record Sales Line, Integer, Boolean, Boolean, Boolean) :#

Summary: This event is raised before checking the document type in the CheckSalesLineQtyIsInvtMultiple function. It allows customization before checking if the document type is valid.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckDocumentTypeInCheckSalesLineQtyIsInvtMultiple(SalesLine: Record "Sales Line"; FieldNo: Integer; var ShowError: Boolean; var IsHandled: Boolean; var DoExit: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckDocumentTypeInCheckSalesLineQtyIsInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckDocumentTypeInCheckSalesLineQtyIsInvtMultiple(SalesLine: Record "Sales Line"; FieldNo: Integer; var ShowError: Boolean; var IsHandled: Boolean; var DoExit: Boolean)
begin
end;

Parameters:

  • SalesLine: The Sales Line record being checked.
  • FieldNo: The field number being checked.
  • ShowError: Specifies if an error is thown if the quantity is not an inventory multiple.
  • isHandled: Specifies if the event has been handled. If set to true, the default check for a valid document type will not be executed.
  • DoExit: Specifies if to exit the function without further processing.

KVSTRDOnBeforeCheckItemJnlLineQtyBase(Record Item Journal Line, Code[50], Code[50], Decimal, Boolean) :#

Summary: This event is raised before checking the item journal line quantity base.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckItemJnlLineQtyBase(ItemJournalLine: Record "Item Journal Line"; LotNo: Code[50]; SerialNo: Code[50]; QtyBase: Decimal; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckItemJnlLineQtyBase', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckItemJnlLineQtyBase(ItemJournalLine: Record "Item Journal Line"; LotNo: Code[50]; SerialNo: Code[50]; QtyBase: Decimal; var IsHandled: Boolean)
begin
end;

Parameters:

  • ItemJournalLine: The Item Journal Line record being checked.
  • LotNo: The Lot Number associated with the item journal line.
  • SerialNo: The Serial Number associated with the item journal line.
  • QtyBase: The quantity base to be checked.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeCheckLocationDirectedPutAwayPick(Record Location, Code[20], Code[10], Decimal, Boolean, Boolean, Boolean) :#

Summary: This event is raised before checking if the location allows directed put-away and pick for the specified item.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckLocationDirectedPutAwayPick(Location: Record "Location"; ItemNo: Code[20]; VariantCode: Code[10]; InvtMultiple: Decimal; InvtMultipleFromVariant: Boolean; var isHandled: Boolean; InvtMultipleFromStockkeepingUnit: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckLocationDirectedPutAwayPick', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckLocationDirectedPutAwayPick(Location: Record "Location"; ItemNo: Code[20]; VariantCode: Code[10]; InvtMultiple: Decimal; InvtMultipleFromVariant: Boolean; var isHandled: Boolean; InvtMultipleFromStockkeepingUnit: Boolean)
begin
end;

Parameters:

  • Location: The Location record being checked.
  • ItemNo: The Item Number associated with the check.
  • VariantCode: The Variant Code associated with the item.
  • InvtMultiple: The inventory multiple to be checked.
  • InvtMultipleFromVariant: Indicates if the inventory multiple is derived from the item variant.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.
  • InvtMultipleFromStockkeepingUnit: Indicates if the inventory multiple is derived from the stockkeeping unit.

KVSTRDOnBeforeCheckReqLineQtyIsInvtMultiple(Record Requisition Line, Boolean) :#

Summary: This event is raised before checking if the requisition line quantity is an inventory multiple. It allows customization before the check is performed.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckReqLineQtyIsInvtMultiple(RequisitionLine: Record "Requisition Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckReqLineQtyIsInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckReqLineQtyIsInvtMultiple(RequisitionLine: Record "Requisition Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • RequisitionLine: The Requisition Line record being checked.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeCheckTransLineQtyIsInvtMultiple(Record Transfer Line, Integer, Boolean) :#

Summary: This event is raised before checking if the transfer line quantity is an inventory multiple. It allows customization before the check is performed.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckTransLineQtyIsInvtMultiple(TransferLine: Record "Transfer Line"; FieldNo: Integer; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckTransLineQtyIsInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckTransLineQtyIsInvtMultiple(TransferLine: Record "Transfer Line"; FieldNo: Integer; var IsHandled: Boolean)
begin
end;

Parameters:

  • TransferLine: The Transfer Line record being checked.
  • FieldNo: The field number being checked.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeCheckWhseActivLineQtyIsInvtMultiple(Record Warehouse Activity Line, Boolean) :#

Summary: This event is raised before checking if the warehouse activity line quantity is an inventory multiple. It allows customization before the check is performed.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckWhseActivLineQtyIsInvtMultiple(WarehouseActivityLine: Record "Warehouse Activity Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckWhseActivLineQtyIsInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckWhseActivLineQtyIsInvtMultiple(WarehouseActivityLine: Record "Warehouse Activity Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • WarehouseActivityLine: The Warehouse Activity Line record being checked.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeCheckWhseShptLineQtyIsInvtMultiple(Record Warehouse Shipment Line, Boolean) :#

Summary: This event is raised before checking if the warehouse shipment line quantity is an inventory multiple. It allows customization before the check is performed.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeCheckWhseShptLineQtyIsInvtMultiple(WarehouseShipmentLine: Record "Warehouse Shipment Line"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeCheckWhseShptLineQtyIsInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeCheckWhseShptLineQtyIsInvtMultiple(WarehouseShipmentLine: Record "Warehouse Shipment Line"; var IsHandled: Boolean)
begin
end;

Parameters:

  • WarehouseShipmentLine: The Warehouse Shipment Line record being checked.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeGetInvtMultipleInRoundSalesLineQtyToInvtMultiple(Record Sales Line, Integer, Boolean) :#

Summary: This event is raised before retrieving the inventory multiple in the RoundSalesLineQtyToInvtMultiple function. It allows customization of the logic or the Sales Line record before the inventory multiple is retrieved.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeGetInvtMultipleInRoundSalesLineQtyToInvtMultiple(var SalesLine: Record "Sales Line"; FieldNo: Integer; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeGetInvtMultipleInRoundSalesLineQtyToInvtMultiple', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeGetInvtMultipleInRoundSalesLineQtyToInvtMultiple(var SalesLine: Record "Sales Line"; FieldNo: Integer; var IsHandled: Boolean)
begin
end;

Parameters:

  • SalesLine: The Sales Line record being processed.
  • FieldNo: The field number being checked.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.

KVSTRDOnBeforeIsValidWarehouseShipmentLineSourceDocument(Record Warehouse Shipment Line, Boolean, Boolean) :#

Summary: This event is raised before checking if the source document type of a Warehouse Shipment Line is valid.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeIsValidWarehouseShipmentLineSourceDocument(WarehouseShipmentLine: Record "Warehouse Shipment Line"; var IsValid: Boolean; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDInventoryMultipleMgt", 'KVSTRDOnBeforeIsValidWarehouseShipmentLineSourceDocument', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeIsValidWarehouseShipmentLineSourceDocument(WarehouseShipmentLine: Record "Warehouse Shipment Line"; var IsValid: Boolean; var IsHandled: Boolean)
begin
end;

Parameters:

  • WarehouseShipmentLine: The Warehouse Shipment Line record being checked.
  • IsValid: Specifies if the source document type is valid. This can be modified by the event subscriber.
  • isHandled: Specifies if the event has been handled. If set to true, the default logic will not be executed.