Codeunit 18126886 EOS055.01 SDH - Sales Line

Codeunit 18126886 EOS055.01 SDH - Sales Line

Methods

AddItemLinesToBuffer

procedure AddItemLinesToBuffer(DocumentType: Integer; DocumentNo: Code[20]; DocumentLineFilter: Text;ItemNo: Code[20]; VariantCode: Code[10];var TempSourceBuffer: Record "EOS055 Handling Unit Buffer")

Parameters / Return Value

  • DocumentType Integer

  • DocumentNo Code[20]

  • DocumentLineFilter Text

  • ItemNo Code[20]

  • VariantCode Code[10]

  • TempSourceBuffer Record "EOS055 Handling Unit Buffer"


IsInbound

procedure IsInbound(SourceSubtype: Integer): Boolean

Parameters / Return Value

  • SourceSubtype Integer

  • Returns Boolean


IsPostedDoc

procedure IsPostedDoc(): Boolean

Parameters / Return Value

  • Returns Boolean

ShowPage

procedure ShowPage(DocumentType: Integer; DocumentNo: Code[20]; LineNo: Integer; SublineNo: Integer): Boolean

Parameters / Return Value

  • DocumentType Integer

  • DocumentNo Code[20]

  • LineNo Integer

  • SublineNo Integer

  • Returns Boolean


LineSourceType

procedure LineSourceType(): Integer

Parameters / Return Value

  • Returns Integer

HeaderSourceType

procedure HeaderSourceType(): Integer

Parameters / Return Value

  • Returns Integer

HandleHuAssignment

procedure HandleHuAssignment(Hu: Record "EOS055 Handling Unit";SourceSubtype: Integer; SourceNo: Code[20];Removed: Boolean;var AssignmentBuffer: Record "EOS055 Handling Unit Buffer")

Parameters / Return Value

  • Hu Record "EOS055 Handling Unit"

  • SourceSubtype Integer

  • SourceNo Code[20]

  • Removed Boolean

  • AssignmentBuffer Record "EOS055 Handling Unit Buffer"


FillEmptyJnlLine

procedure FillEmptyJnlLine(DocumentType: Integer; DocumentNo: Code[20]; var EmptyJnlLine: Record "EOS029 Container Jnl. Line")

Parameters / Return Value

  • DocumentType Integer

  • DocumentNo Code[20]

  • EmptyJnlLine Record "EOS029 Container Jnl. Line"


GetAssignmentTargets

procedure GetAssignmentTargets(DocumentType: Integer; DocumentNo: Code[20]; var TmpAssignmentTarget: Record "EOS055.01 HU Assignment Target")

Parameters / Return Value

  • DocumentType Integer

  • DocumentNo Code[20]

  • TmpAssignmentTarget Record "EOS055.01 HU Assignment Target"


CopyFieldsToHuBuffer

procedure CopyFieldsToHuBuffer(SalesLine: Record "Sales Line"; var TempHuBuffer: Record "EOS055 Handling Unit Buffer"): Boolean

Parameters / Return Value

  • SalesLine Record "Sales Line"

  • TempHuBuffer Record "EOS055 Handling Unit Buffer"

  • Returns Boolean


DeleteEmptyItem

procedure DeleteEmptyItem(DocEmptyItem: Record "EOS029 Document Container")

Parameters / Return Value

  • DocEmptyItem Record "EOS029 Document Container"

CreateEmptyItem

procedure CreateEmptyItem(var DocContainer: Record "EOS029 Document Container")

Parameters / Return Value

  • DocContainer Record "EOS029 Document Container"

CreateDocContainer

procedure CreateDocContainer(var DocContainer: Record "EOS029 Document Container"): Integer

Parameters / Return Value

  • DocContainer Record "EOS029 Document Container"

  • Returns Integer


SetSourceDocument

procedure SetSourceDocument(DocVariant: Variant): Boolean

Parameters / Return Value

  • DocVariant Variant

  • Returns Boolean


DeleteContainers

procedure DeleteContainers(var DocContainer: Record "EOS029 Document Container")

Parameters / Return Value

  • DocContainer Record "EOS029 Document Container"

CreateContainers

procedure CreateContainers(var DocContainer: Record "EOS029 Document Container")

Parameters / Return Value

  • DocContainer Record "EOS029 Document Container"

CollectContainers

procedure CollectContainers(var DocContainer: Record "EOS029 Document Container")

Parameters / Return Value

  • DocContainer Record "EOS029 Document Container"

Events

OnAfterCopyFieldsToHuBuffer

local procedure OnAfterCopyFieldsToHuBuffer(SalesLine: Record "Sales Line"; var TempHuBuffer: Record "EOS055 Handling Unit Buffer"; var Success: enum "EOS066 TriState Boolean")

Raised after fields have been copied from a sales line to the handling unit buffer. Use this to copy custom fields.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The source sales line.

  • TempHuBuffer Record "EOS055 Handling Unit Buffer"

    The target handling unit buffer.

  • Success enum "EOS066 TriState Boolean"

    Gets or sets if the operation was successful.


OnFindSalesLineForContainerItem

local procedure OnFindSalesLineForContainerItem(var SalesLine: Record "Sales Line"; DocContainerItem: Record "EOS029 Document Container"; var Found: Boolean; var Handled: Boolean; SalesHeader: Record "Sales Header")

Raised whenever a sales line for the a given container item is looked up. Use this to change filters and/or apply custom ones or implement a new logic altogether.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line.

  • DocContainerItem Record "EOS029 Document Container"

    The document container item.

  • Found Boolean

    Use this to comunicate that a sales line has been found. Make sure you have set SalesLine to the sales line to use. If you return false, a new sales line is created. This is only relevant, if you also set Handled to true.

  • Handled Boolean

    Gets or sets that this event has been completely handled and no further processing should be done in the calling method.

  • SalesHeader Record "Sales Header"

    The Sales Header


OnBeforeInsertContainerItemSalesLine

local procedure OnBeforeInsertContainerItemSalesLine(var SalesLine: Record "Sales Line"; DocContainerItem: Record "EOS029 Document Container")

Raised before insert the Container Sales Line. Use it to modify the Sales Line No.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    Sales Line to insert

  • DocContainerItem Record "EOS029 Document Container"

    The document container item for which the sales line has been created.


OnBeforeValidateQuantityOnContainerItemSalesLine

local procedure OnBeforeValidateQuantityOnContainerItemSalesLine(var SalesLine: Record "Sales Line"; DocContainer: Record "EOS029 Document Container"; SignFactor: Integer; var QuantityToHandle: Decimal)

Raised after creating the container Sales Line and before validating the line quantity. Use it to modify the quantity to handle.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    Container Sales Line

  • DocContainer Record "EOS029 Document Container"

    The document container item

  • SignFactor Integer

    The sign of the line

  • QuantityToHandle Decimal

    Quantity to handle on the sales line


OnAfterUpdateContainerItemSalesLine

local procedure OnAfterUpdateContainerItemSalesLine(var SalesLine: Record "Sales Line"; DocContainerItem: Record "EOS029 Document Container"; LineCreated: Boolean)

Raised after a sales line has been created or updated for a given document container item. Use this to apply custom fields and or attach custom logic.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line that was created or updated.

  • DocContainerItem Record "EOS029 Document Container"

    The document container item for which the sales line has been updated.

  • LineCreated Boolean

    Indicates whether a new line has been created or an existing one has been updated.


OnBeforeDeleteEmptyItem

local procedure OnBeforeDeleteEmptyItem(SalesLine: Record "Sales Line"; DocContainerItem: Record "EOS029 Document Container"; var QtyToKeep: Decimal; var Handled: Boolean)

Raised before a container line is deleted from a source document. Use this to apply custom logic and/or modify the quantity to be kept or deleted.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line.

  • DocContainerItem Record "EOS029 Document Container"

    The document container item.

  • QtyToKeep Decimal

    The quantity to keep. This will be pre-filled with the quantity that has been posted on the given document line.

  • Handled Boolean

    Gets or sets if this event has been completely handled and no further processing should be done in the calling method.


OnCheckDeleteUsedPackagingInstruction

local procedure OnCheckDeleteUsedPackagingInstruction(Rec: Record "EOS055 Packaging Instruction"; var IsHandled: Boolean)

Raised when a packaging instruction is deleted. This operation is allowed only if it is not used in any sales line. Use this event to add custom checks or skip standard one.

Parameters / Return Value

  • Rec Record "EOS055 Packaging Instruction"

    Packaging instruction you’re deleting.

  • IsHandled Boolean

    Gets or sets if this event has been completely handled and no further processing should be done in the calling method.


OnBeforeCheckHandlingUnitIssues

local procedure OnBeforeCheckHandlingUnitIssues(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)

This event is raised before calling the CheckHandlingUnitIssues procedure.

Parameters / Return Value

  • SalesHeader Record "Sales Header"

    The document header.

  • IsHandled Boolean

    If true, skips the procedure call.


OnCreateDocContainerOnBeforeSalesReopen

local procedure OnCreateDocContainerOnBeforeSalesReopen(var SalesHeader: Record "Sales Header"; DocContainerItem: Record "EOS029 Document Container"; var IsHandled: Boolean)

Raised before open Sales Header when creating Containers.

Parameters / Return Value

  • SalesHeader Record "Sales Header"

    Sales Header to open

  • DocContainerItem Record "EOS029 Document Container"

    The document container item.

  • IsHandled Boolean

    If true, skips the procedure call.


OnCreateDocContainerOnBeforeSalesRelease

local procedure OnCreateDocContainerOnBeforeSalesRelease(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Raised before release Sales Header after creating Container Sales Line.

Parameters / Return Value

  • SalesHeader Record "Sales Header"

    Sales Header to release

  • SalesLine Record "Sales Line"

    Sales Line to modify

  • IsHandled Boolean

    If true, skips the procedure call.


OnDeleteContainersOnBeforeSalesReopen

local procedure OnDeleteContainersOnBeforeSalesReopen(var SalesHeader: Record "Sales Header"; DocContainerItem: Record "EOS029 Document Container"; var IsHandled: Boolean)

Raised before open Sales Header when deleting Containers on Sales Lines.

Parameters / Return Value

  • SalesHeader Record "Sales Header"

    Sales Header to open

  • DocContainerItem Record "EOS029 Document Container"

    The document container item.

  • IsHandled Boolean

    If true, skips the procedure call.


OnDeleteContainersOnBeforeSalesRelease

local procedure OnDeleteContainersOnBeforeSalesRelease(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)

Raised before release Sales Header after deleting Containers on Sales Lines.

Parameters / Return Value

  • SalesHeader Record "Sales Header"

    Sales Header to release

  • IsHandled Boolean

    If true, skips the procedure call.



EOS Labs -