Skip to content

KVSTRDRentalManagement#

Procedures#

GetRentalDescription(Code[20], Boolean, Integer, Integer, Text[100]) : Text[100]#

Summary: Gets the descrition of a rental item (or service item, if the rental redesign is not activated).

procedure GetRentalDescription(RentalItemNo: Code[20]; IsRentalInterruption: Boolean; RentalConsumptionLineNo: Integer; RentalAdditionalItemLineNo: Integer; SourceDescription: Text[100]): Text[100]

Parameters:

  • RentalItemNo: The Rental Item No.
  • IsRentalInterruption: Specify if it it a rental interruption.
  • RentalConsumptionLineNo: The Rental Consumption Line No.
  • RentalAdditionalItemLineNo: The Rental Additional Item Line No.
  • SourceDescription: The current description

Returns: The value of the field "Description" of the rental/service item.

Events#

KVSTRDOnBeforeSetDescriptionInInsertTransferLine(Record Transfer Line, Record KVSTRDRentalItemSalesBOM, Boolean) :#

Summary: Integration event that allows customization of the description setting process when inserting a transfer line for a rental item sales BOM.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnBeforeSetDescriptionInInsertTransferLine(var TransferLine: Record "Transfer Line"; RentalItemSalesBOM: Record "KVSTRDRentalItemSalesBOM"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDRentalManagement", 'KVSTRDOnBeforeSetDescriptionInInsertTransferLine', '', false, false)]
local procedure DoSomethingKVSTRDOnBeforeSetDescriptionInInsertTransferLine(var TransferLine: Record "Transfer Line"; RentalItemSalesBOM: Record "KVSTRDRentalItemSalesBOM"; var IsHandled: Boolean)
begin
end;

Parameters:

  • TransferLine: The transfer line record being inserted.
  • RentalItemSalesBOM: The rental item sales BOM record associated with the transfer line.
  • IsHandled: A boolean variable indicating whether the event has been handled by the subscriber. If set to true, the standard description setting logic will be skipped.

KVSTRDOnElseUnitOfMeasureCodeInCalculateRentalQuantityByUnitOfMeasure(Code[20], Code[20], Integer, Code[10], Date, Time, Date, Time, Boolean, Decimal) :#

Summary: Integration event that allows customization of rental quantity calculation when a specific unit of measure code is encountered. This event is triggered during rental quantity calculation by unit of measure when the standard logic doesn't handle the specific unit of measure code. Subscribers can implement custom calculation logic for non-standard units of measure.

[IntegrationEvent(false, false)]
local procedure KVSTRDOnElseUnitOfMeasureCodeInCalculateRentalQuantityByUnitOfMeasure(RentalItemNo: Code[20]; ItemCategoryCode: Code[20]; NoOfRentalItems: Integer; UnitOfMeasureCode: Code[10]; StartingDate: Date; StartingTime: Time; EndingDate: Date; EndingTime: Time; IgnoreCalendar: Boolean; var RentalQuantityToReturn: Decimal): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDRentalManagement", 'KVSTRDOnElseUnitOfMeasureCodeInCalculateRentalQuantityByUnitOfMeasure', '', false, false)]
local procedure DoSomethingKVSTRDOnElseUnitOfMeasureCodeInCalculateRentalQuantityByUnitOfMeasure(RentalItemNo: Code[20]; ItemCategoryCode: Code[20]; NoOfRentalItems: Integer; UnitOfMeasureCode: Code[10]; StartingDate: Date; StartingTime: Time; EndingDate: Date; EndingTime: Time; IgnoreCalendar: Boolean; var RentalQuantityToReturn: Decimal)
begin
end;

Parameters:

  • RentalItemNo: The rental item number for which the quantity is being calculated
  • ItemCategoryCode: The item category code associated with the rental item
  • NoOfRentalItems: The number of rental items involved in the calculation
  • UnitOfMeasureCode: The unit of measure code that triggered this event (not handled by standard logic)
  • StartingDate: The rental period starting date
  • StartingTime: The rental period starting time
  • EndingDate: The rental period ending date
  • EndingTime: The rental period ending time
  • IgnoreCalendar: Indicates whether calendar-based calculations should be ignored
  • RentalQuantityToReturn: The calculated rental quantity to return (can be modified by event subscribers)

KVSTRDOnAfterCreateTransferHeader(Record Sales Line, Enum Transfer Direction, Code[10], Code[10], Record Transfer Header) :#

[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterCreateTransferHeader(SalesLine: Record "Sales Line"; TransferDirection: Enum "Transfer Direction"; FromLocationCode: Code[10]; ToLocationCode: Code[10]; var TransferHeader: Record "Transfer Header"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDRentalManagement", 'KVSTRDOnAfterCreateTransferHeader', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterCreateTransferHeader(SalesLine: Record "Sales Line"; TransferDirection: Enum "Transfer Direction"; FromLocationCode: Code[10]; ToLocationCode: Code[10]; var TransferHeader: Record "Transfer Header")
begin
end;

KVSTRDOnAfterInsertTransferLine(Record Transfer Line, Record KVSTRDRentalItemSalesBOM, Decimal, Enum Transfer Direction) :#

[IntegrationEvent(false, false)]
local procedure KVSTRDOnAfterInsertTransferLine(var TransferLine: Record "Transfer Line"; RentalItemSalesBOM: Record "KVSTRDRentalItemSalesBOM"; QuantityToSet: Decimal; TransferDirection: Enum "Transfer Direction"): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSTRDRentalManagement", 'KVSTRDOnAfterInsertTransferLine', '', false, false)]
local procedure DoSomethingKVSTRDOnAfterInsertTransferLine(var TransferLine: Record "Transfer Line"; RentalItemSalesBOM: Record "KVSTRDRentalItemSalesBOM"; QuantityToSet: Decimal; TransferDirection: Enum "Transfer Direction")
begin
end;