Skip to content

KVSMEDDeliveryScheduleLib#

Procedures#

OnRun#

procedure OnRun(Rec: Record "#437dbf0e84ff417a965ded2bb9650972#Job Queue Entry")

OpenDeliveryScheduleForCustomer(Code[20]) :#

Summary: Opens the delivery schedule for a specific customer

procedure OpenDeliveryScheduleForCustomer(CustomerNo: Code[20]): 

Parameters:

  • CustomerNo:

CreateDeliveryScheduleLinesBySchedLines(Code[20], Date, Boolean, Enum KVSMEDDeliveryScheduleLineType, Record KVSMEDDeliveryScheduleLine) :#

Summary: Creates delivery schedule lines by schedule lines. This procedure considers different types of delivery schedule line types and performs various operations including creating new lines, checking if lines already exist, getting process and process periods, overwriting user fields, handling BOM lines, setting required care period in delivery schedule line, and performing family pricing.

procedure CreateDeliveryScheduleLinesBySchedLines(CustomerNo: Code[20]; Date: Date; SetDate: Boolean; KVSMEDDeliveryScheduleLineType: Enum "KVSMEDDeliveryScheduleLineType"; var TempKVSMEDDeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine" temporary): 

Parameters:

  • CustomerNo:
  • Date:
  • SetDate:
  • KVSMEDDeliveryScheduleLineType:
  • TempKVSMEDDeliveryScheduleLine:

CreateDeliveryScheduleLineByContractLine(Code[20], Date, Boolean, Record KVSMEDProcess, Record KVSMEDProcessPeriod, Record KVSMEDContractVersionLine, Enum KVSMEDDeliveryScheduleLineType, Code[50]) : BigInteger#

Summary: Creates a delivery schedule line by contract line. This procedure validates and inserts data from the customer, contract line, process period, and other parameters into the delivery schedule line record. It performs different operations based on the line type (New, Add, Extend), and updates the dates and unit price as necessary. Returns the line number of the new delivery schedule line record.

procedure CreateDeliveryScheduleLineByContractLine(CustomerNo: Code[20]; Date: Date; SetDate: Boolean; KVSMEDProcess: Record "KVSMEDProcess"; KVSMEDProcessPeriod: Record "KVSMEDProcessPeriod"; KVSMEDContractVersionLine: Record "KVSMEDContractVersionLine"; KVSMEDDeliveryScheduleLineType: Enum "KVSMEDDeliveryScheduleLineType"; SerialNo: Code[50]): BigInteger

Parameters:

  • CustomerNo:
  • Date:
  • SetDate:
  • KVSMEDProcess:
  • KVSMEDProcessPeriod:
  • KVSMEDContractVersionLine:
  • KVSMEDDeliveryScheduleLineType:
  • SerialNo:

Returns: Line No. of the new delivery shedule line

ReleaseDeliveryScheduleLine(Record KVSMEDDeliveryScheduleLine, Boolean) : Boolean#

Summary: Releases the delivery schedule line by checking quantity limits, updating the status, and creating planned calls for the line. Also handles related tasks such as inserting additional field values, updating billing schedule lines, and checking for individual address contacts. The delivery schedule line record to be released. Determines whether to release the billing schedule. Returns true if the procedure successfully completes, false otherwise.

procedure ReleaseDeliveryScheduleLine(var KVSMEDDeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine"; ReleaseBillingSchedule: Boolean): Boolean

Parameters:

  • KVSMEDDeliveryScheduleLine:
  • ReleaseBillingSchedule:

Returns:

ReopenDeliveryScheduleLine(Record KVSMEDDeliveryScheduleLine, Boolean) :#

Summary: Reopens the status of selected delivery lines. It sets the status to 'Open' and modifies it. Deletes the planned calls for the line. If ReopenBillingScheduleLine is true, it gets the billing schedule lines and reopens the billing schedule lines.

procedure ReopenDeliveryScheduleLine(var KVSMEDDeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine"; ReopenBillingScheduleLine: Boolean): 

Parameters:

  • KVSMEDDeliveryScheduleLine:
  • ReopenBillingScheduleLine:

CreateDeliveryScheduleCallsBySchedLines(Code[20], Date, Enum KVSMEDContractFindingType, Record KVSMEDDeliveryScheduleLine, Record KVSMEDDeliveryScheduleCall) : Boolean#

Summary: Creates delivery schedule calls based on schedule lines. This procedure is called with parameters for the customer number, date, mode, temporary delivery schedule line and temporary delivery schedule call. It processes only lines with non-zero quantity and valid processes. Depending on the mode parameter, different actions are taken. At the beginning of the procedure, a commit is executed immediately.

procedure CreateDeliveryScheduleCallsBySchedLines(CustomerNo: Code[20]; Date: Date; Mode: Enum "KVSMEDContractFindingType"; var TempKVSMEDDeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine" temporary; var TempKVSMEDDeliveryScheduleCall: Record "KVSMEDDeliveryScheduleCall" temporary): Boolean

Parameters:

  • CustomerNo:
  • Date:
  • Mode:
  • TempKVSMEDDeliveryScheduleLine:
  • TempKVSMEDDeliveryScheduleCall:

Returns:

Events#

OnTransferTempContract2DeliverySchedLinesBeforeDeliveryScheduleLineInsert(Code[20], Date, Record KVSMEDContractVersionLine, Option, Record KVSMEDDeliveryScheduleLine) :#

[IntegrationEvent(false, false)]
local procedure OnTransferTempContract2DeliverySchedLinesBeforeDeliveryScheduleLineInsert(CustomerNo: Code[20]; Date: Date; var TempContractLine: Record "KVSMEDContractVersionLine" temporary; Type: Option; var TempDeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine" temporary): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSMEDDeliveryScheduleLib", 'OnTransferTempContract2DeliverySchedLinesBeforeDeliveryScheduleLineInsert', '', false, false)]
local procedure DoSomethingOnTransferTempContract2DeliverySchedLinesBeforeDeliveryScheduleLineInsert(CustomerNo: Code[20]; Date: Date; var TempContractLine: Record "KVSMEDContractVersionLine" temporary; Type: Option; var TempDeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine" temporary)
begin
end;

OnBeforeDeliveryScheduleLineIsCashDesk(Record KVSMEDDeliveryScheduleLine, Boolean) :#

[IntegrationEvent(false, false)]
local procedure OnBeforeDeliveryScheduleLineIsCashDesk(DeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine"; var IsHandled: Boolean): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSMEDDeliveryScheduleLib", 'OnBeforeDeliveryScheduleLineIsCashDesk', '', false, false)]
local procedure DoSomethingOnBeforeDeliveryScheduleLineIsCashDesk(DeliveryScheduleLine: Record "KVSMEDDeliveryScheduleLine"; var IsHandled: Boolean)
begin
end;