Codeunit 18122374 EOS CWS Sales Mgmt

Codeunit 18122374 EOS CWS Sales Mgmt

Methods

ClearTemp

procedure ClearTemp()

CreateShipmentHeaderForSourceSalesOrder

procedure CreateShipmentHeaderForSourceSalesOrder(PostedWhseShipmentLine: Record "Posted Whse. Shipment Line"; PostingGroupNo: Integer)

Parameters / Return Value

  • PostedWhseShipmentLine Record "Posted Whse. Shipment Line"

  • PostingGroupNo Integer


CreateShipmentHeaderNotFromWhseDocument

procedure CreateShipmentHeaderNotFromWhseDocument(SalesShipmentHeader: Record "Sales Shipment Header"; PostingGroupNo: Integer; UseShipmentNoFromSource: Boolean)

Parameters / Return Value

  • SalesShipmentHeader Record "Sales Shipment Header"

  • PostingGroupNo Integer

  • UseShipmentNoFromSource Boolean


SetSalesHeaderInfo

procedure SetSalesHeaderInfo(WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var SalesHeader: Record "Sales Header"): Boolean

Parameters / Return Value

  • WarehouseShipmentHeader Record "Warehouse Shipment Header"

  • SalesHeader Record "Sales Header"

  • Returns Boolean


TransferSalesShipmentLineToShipmentLine

procedure TransferSalesShipmentLineToShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; ShipmentHeader: Record "EOS CWS Shipment Header"; Correction: Boolean): Integer

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

  • ShipmentHeader Record "EOS CWS Shipment Header"

  • Correction Boolean

  • Returns Integer


SynchSalesShipmentLineToShipmentLine

procedure SynchSalesShipmentLineToShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; var ShipmentLine: Record "EOS CWS Shipment Line")

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

  • ShipmentLine Record "EOS CWS Shipment Line"


InsertEntriesRelationFromSalesShipmentLine

procedure InsertEntriesRelationFromSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; ShipmentLine: record "EOS CWS Shipment Line")

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

  • ShipmentLine record "EOS CWS Shipment Line"


TransferFieldsFromSourceHeader

procedure TransferFieldsFromSourceHeader(SalesShipmentHeader: Record "Sales Shipment Header"; var ShipmentHeader: Record "EOS CWS Shipment Header")

Parameters / Return Value

  • SalesShipmentHeader Record "Sales Shipment Header"

  • ShipmentHeader Record "EOS CWS Shipment Header"


TransferFieldsFromSourceLine

procedure TransferFieldsFromSourceLine(SalesShipmentLine: Record "Sales Shipment Line"; var ShipmentLine: Record "EOS CWS Shipment Line")

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

  • ShipmentLine Record "EOS CWS Shipment Line"


UndoSalesShipmentLine

procedure UndoSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line")

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

HandleSalesNotInventoryLine

procedure HandleSalesNotInventoryLine(WhseDocLine: Variant; var SalesLine: Record "Sales Line"; Invoice: Boolean): Boolean

Parameters / Return Value

  • WhseDocLine Variant

  • SalesLine Record "Sales Line"

  • Invoice Boolean

  • Returns Boolean


InsertInvLineDescriptionFromShpt

procedure InsertInvLineDescriptionFromShpt(var SalesShptLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var NextLineNo: Integer; var Handled: Boolean)

Parameters / Return Value

  • SalesShptLine Record "Sales Shipment Line"

  • SalesLine Record "Sales Line"

  • NextLineNo Integer

  • Handled Boolean


GetOrderDescriptionForInvLineDescriptionFromShpt

procedure GetOrderDescriptionForInvLineDescriptionFromShpt(SalesShptLine: Record "Sales Shipment Line"): Text[100]

Parameters / Return Value

  • SalesShptLine Record "Sales Shipment Line"

  • Returns Text[100]


PrintFromSalesPostDocument

procedure PrintFromSalesPostDocument(LastShipmentNo: Code[20]; SendReportAsEmail: Boolean)

Parameters / Return Value

  • LastShipmentNo Code[20]

  • SendReportAsEmail Boolean


UpdateCertificateOfSupply

procedure UpdateCertificateOfSupply(SalesShipmentHeader: Record "Sales Shipment Header")

Parameters / Return Value

  • SalesShipmentHeader Record "Sales Shipment Header"

TransferAddressFieldsToSourceHeader

procedure TransferAddressFieldsToSourceHeader(ShipmentHeader: Record "EOS CWS Shipment Header"; var SalesShipmentHeader: Record "Sales Shipment Header")

Parameters / Return Value

  • ShipmentHeader Record "EOS CWS Shipment Header"

  • SalesShipmentHeader Record "Sales Shipment Header"


InsertOrderRefLines

procedure InsertOrderRefLines(ShipmentHeader: Record "EOS CWS Shipment Header")

Parameters / Return Value

  • ShipmentHeader Record "EOS CWS Shipment Header"

Events

OnAfterCreateShipmentHeaderForSourceSalesOrder

local procedure OnAfterCreateShipmentHeaderForSourceSalesOrder(var ShipmentHeader: Record "EOS CWS Shipment Header"; PostingGroupNo: Integer; PostedWhseShipmentLine: Record "Posted Whse. Shipment Line")

This event is raised after CWS shipment creation from Sales Order.

Parameters / Return Value

  • ShipmentHeader Record "EOS CWS Shipment Header"

    CWS Shipment Header created.

  • PostingGroupNo Integer

    EOS Posting Group No. on CWS shipment header

  • PostedWhseShipmentLine Record "Posted Whse. Shipment Line"

    Source Posted Whse Shipment Line.


OnAfterCreateCWSShipment

local procedure OnAfterCreateCWSShipment(SalesShipmentHeader: Record "Sales Shipment Header"; PostingGroupNo: Integer; var ShipmentHeader: Record "EOS CWS Shipment Header")

This event is raised after CWS shipment creation from not whse. posting.

Parameters / Return Value

  • SalesShipmentHeader Record "Sales Shipment Header"

    Source Document Header

  • PostingGroupNo Integer

    EOS Posting Group No. on CWS shipment header

  • ShipmentHeader Record "EOS CWS Shipment Header"

    CWS Shipment Header created.


OnAfterSetSalesHeaderInfo

local procedure OnAfterSetSalesHeaderInfo(var SalesHeader: Record "Sales Header"; DocGroupingEntry: Record "EOS CWS Doc. Grouping Entry"; var ModifyHeader: Boolean)

This event is raised after Group Shipment Info are set on Source Document in whse. posting process.

Parameters / Return Value

  • SalesHeader Record "Sales Header"

    Source Document

  • DocGroupingEntry Record "EOS CWS Doc. Grouping Entry"

    Document Grouping Entry

  • ModifyHeader Boolean

    Set true to modify value on Source Document


OnAfterInsertEntryRelationFromSalesShipmentLine

local procedure OnAfterInsertEntryRelationFromSalesShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; DocNoFilter: Code[20]; PostingDateFilter: Date; ShipmentLine: record "EOS CWS Shipment Line")

This event is raised after insert Entry Relations for Posted Source Document Line. You can use to create Entry Relation for custom tables.

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

    Posted Source Document Line

  • DocNoFilter Code[20]

    Document No.

  • PostingDateFilter Date

    Posting Date

  • ShipmentLine record "EOS CWS Shipment Line"

    Shipment Line


OnAfterTransferFieldsFromSourceHeader

local procedure OnAfterTransferFieldsFromSourceHeader(SalesShipmentHeader: Record "Sales Shipment Header"; var ShipmentHeader: Record "EOS CWS Shipment Header")

This event is raised after transferfields from Posted Source Document Header to Shipment Header. You can use to transfer custom fields.

Parameters / Return Value

  • SalesShipmentHeader Record "Sales Shipment Header"

    Posted Source Document Header

  • ShipmentHeader Record "EOS CWS Shipment Header"

    Shipment Header


OnAfterTransferFieldsFromSourceLine

local procedure OnAfterTransferFieldsFromSourceLine(SalesShipmentLine: Record "Sales Shipment Line"; var ShipmentLine: Record "EOS CWS Shipment Line")

This event is raised after transferfields from Posted Source Document Line to Shipment Line. You can use to transfer custom fields.

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

    Posted Source Document Line

  • ShipmentLine Record "EOS CWS Shipment Line"

    Shipment Line


OnAfterTransferAddressFieldsToSourceHeader

local procedure OnAfterTransferAddressFieldsToSourceHeader(ShipmentHeader: Record "EOS CWS Shipment Header"; var SalesShipmentHeader: Record "Sales Shipment Header")

This event is raised after transferfields from Shipment Header to Posted Source Document Header and before use Format Address codeunit to format addresses in report print.

Parameters / Return Value

  • ShipmentHeader Record "EOS CWS Shipment Header"

    Shipment Header

  • SalesShipmentHeader Record "Sales Shipment Header"

    Posted Source Document Header


OnGetOrderDescriptionForInvLineDescriptionFromShpt

local procedure OnGetOrderDescriptionForInvLineDescriptionFromShpt(var SalesLine: Record "Sales Line";SalesHeader: Record "Sales Header";SalesShptLine: Record "Sales Shipment Line";OrderLineDescription: Enum "EOS006 CWS Sales Order Line Description")

Raised when inserting order description lines in a sales invoice, after getting shipment lines. Subscribe to this event if you have extended the corresponding enum.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The Sales Line record with the description.

  • SalesHeader Record "Sales Header"

    The header record.

  • SalesShptLine Record "Sales Shipment Line"

    The Sales Shipment Line.

  • OrderLineDescription Enum "EOS006 CWS Sales Order Line Description"

    The value of the Sales Order Line Description enum in the CWS setup.


OnInsertOrderRefLines

local procedure OnInsertOrderRefLines(ShipmentLine: Record "EOS CWS Shipment Line";OrderLineDescription: Enum "EOS006 CWS Sales Order Line Description")

Raised when inserting order description lines in a sales shipment, after inserting all the lines. Subscribe to this event if you have extended the corresponding enum.

Parameters / Return Value

  • ShipmentLine Record "EOS CWS Shipment Line"

    The first shipment line for the sales order.

  • OrderLineDescription Enum "EOS006 CWS Sales Order Line Description"

    The value of the Sales Order Line Description enum in the CWS setup.


OnInsertAdditionalInvTextLinesFromShptLine

local procedure OnInsertAdditionalInvTextLinesFromShptLine(var SalesLine: Record "Sales Line";SalesShipmentLine: Record "Sales Shipment Line";var NextLineNo: Integer;OrderLineDescription: Enum "EOS006 CWS Sales Order Line Description")

Raised when inserting additional order description lines in a sales invoice. Subscribe to this event if you have extended the corresponding enum.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The first description line.

  • SalesShipmentLine Record "Sales Shipment Line"

    The Sales Shipment Line that is being invoiced.

  • NextLineNo Integer

    The NextLineNo value.

  • OrderLineDescription Enum "EOS006 CWS Sales Order Line Description"

    The value of the Sales Order Line Description enum in the CWS setup.


OnBeforeInsertAdditionalInvTextLines

local procedure OnBeforeInsertAdditionalInvTextLines(var SalesLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line")

Raised before inserting the additional invoice line.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line.

  • SalesShipmentLine Record "Sales Shipment Line"

    The sales shipment line.


OnBeforeGetHeaderNoFromWhse

local procedure OnBeforeGetHeaderNoFromWhse(PostedWhseShptLine: Record "Posted Whse. Shipment Line"; var ShipmentNo: Code[20])

Raised before assigning the No. to the CWS Header after posting a warehouse shipment.

Parameters / Return Value

  • PostedWhseShptLine Record "Posted Whse. Shipment Line"

    The first Posted Whse. Shipment Line in the CWS.

  • ShipmentNo Code[20]

    The no. you want to assign to the CWS.


OnBeforeInsertOldSalesDocNoLine

local procedure OnBeforeInsertOldSalesDocNoLine(var ToSalesHeader: Record "Sales Header"; var ToSalesLine: Record "Sales Line"; OldDocType: Option; OldDocNo: Code[20]; var IsHandled: Boolean)

Raised when writing the CWS descriptive line in a sales invoice

Parameters / Return Value

  • ToSalesHeader Record "Sales Header"

    Destination sales header

  • ToSalesLine Record "Sales Line"

    Destination sales line

  • OldDocType Option

    Origin document type

  • OldDocNo Code[20]

    Origin document number

  • IsHandled Boolean

    If true, skips CWS code


OnBeforeInsertInvLineDescription

local procedure OnBeforeInsertInvLineDescription(var SalesLine: Record "Sales Line"; ShipmentHeaderNo: Code[20])

Raised before inserting the invoice line with the shipment description.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line.

  • ShipmentHeaderNo Code[20]

    The CWS shipment header.


OnBeforeGetShptDescription

local procedure OnBeforeGetShptDescription(SalesShptLine: Record "Sales Shipment Line"; var ShipText: Text[100])

Raised before setting the shipment description.

Parameters / Return Value

  • SalesShptLine Record "Sales Shipment Line"

    The sales shipment line.

  • ShipText Text[100]

    The text for the shipment description line. If left blank, it gets automatically generated.


OnAfterGetOrderDescriptionForInvLineDescriptionFromShpt

local procedure OnAfterGetOrderDescriptionForInvLineDescriptionFromShpt(var SalesLine: Record "Sales Line"; SalesShptLine: Record "Sales Shipment Line")

Raised before inserting the invoice line with the order description.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line.

  • SalesShptLine Record "Sales Shipment Line"

    The sales shipment line.


OnBeforePostNotInventoryLinesCheck

local procedure OnBeforePostNotInventoryLinesCheck(WhseDocumentLine: RecordRef; var SalesLine: Record "Sales Line"; var IsHandled: Boolean)

Raised before checking if not inventory lines should be posted along with a receipt.

Parameters / Return Value

  • WhseDocumentLine RecordRef

    The warehouse line record (either shipment or receipt).

  • SalesLine Record "Sales Line"

    The sales line record.

  • IsHandled Boolean

    If true, skips the check and posts the line regardless of setup.


OnBeforePostNotInventoryLine

local procedure OnBeforePostNotInventoryLine(var SalesLine: Record "Sales Line"; WhseDocumentLine: RecordRef; Invoice: Boolean; var IsHandled: Boolean)

Raised before posting a not inventory line.

Parameters / Return Value

  • SalesLine Record "Sales Line"

    The sales line record.

  • WhseDocumentLine RecordRef

    Either the warehouse shipment line or warehouse receipt line record.

  • Invoice Boolean

    Whether the system will post an invoice as well.

  • IsHandled Boolean

    If true, skips the posting logic.


OnBeforeTransferSalesShipmentLineToShipmentLine

local procedure OnBeforeTransferSalesShipmentLineToShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; ShipmentHeader: Record "EOS CWS Shipment Header"; Correction: Boolean)

Raised before copying Sales Shipment Line to Shipment Line.

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

  • ShipmentHeader Record "EOS CWS Shipment Header"

  • Correction Boolean


OnAfterTransferSalesShipmentLineToShipmentLine

local procedure OnAfterTransferSalesShipmentLineToShipmentLine(SalesShipmentLine: Record "Sales Shipment Line"; ShipmentHeader: Record "EOS CWS Shipment Header"; Correction: Boolean; var ShipmentLine: Record "EOS CWS Shipment Line")

Raised after copying Sales Shipment Line to Shipment Line.

Parameters / Return Value

  • SalesShipmentLine Record "Sales Shipment Line"

  • ShipmentHeader Record "EOS CWS Shipment Header"

  • Correction Boolean

  • ShipmentLine Record "EOS CWS Shipment Line"


OnAfterInsertInvLineDescription_BeforeAssignNextLineNo

local procedure OnAfterInsertInvLineDescription_BeforeAssignNextLineNo(var SalesLineCWS: Record "Sales Line"; EOSShipmentNo: Code[20]; var NextLineNo: Integer)

Raised in the procedure InsertInvLineDescriptionFromShpt, after insert the first Sales Line Comment with CWS Shipment Info. Use it to insert custom description lines and then update the “Next Line No”.

Parameters / Return Value

  • SalesLineCWS Record "Sales Line"

    CWS Sales Line inserted

  • EOSShipmentNo Code[20]

    CWS Shipment No

  • NextLineNo Integer

    Next Line No to assign to Sales Line


OnBeforeInsertShipmentDescLine_YourReferenceAndOrderNo

local procedure OnBeforeInsertShipmentDescLine_YourReferenceAndOrderNo(ShipmentLine: Record "EOS CWS Shipment Line"; ShipmentHeader: Record "EOS CWS Shipment Header"; OrderLineDescriptionSales: Enum "EOS006 CWS Sales Order Line Description"; var IsHandled: Boolean)

Raised before insert comment lines on CWS if the setup “Order Line Description-Sales” is “Your Reference + Order No.". Use it to insert custom comments.

Parameters / Return Value

  • ShipmentLine Record "EOS CWS Shipment Line"

    The first shipment line for the sales order

  • ShipmentHeader Record "EOS CWS Shipment Header"

    CWS Shipment Header

  • OrderLineDescriptionSales Enum "EOS006 CWS Sales Order Line Description"

    The value of the Sales Order Line Description enum in the CWS setup.

  • IsHandled Boolean

    if true, skip the insertion of comment lines


OnAfterInsertOrderRefLinesFromSalesShptLine

local procedure OnAfterInsertOrderRefLinesFromSalesShptLine(ShipmentLine: Record "EOS CWS Shipment Line"; OrderLineDescriptionSales: Enum "EOS006 CWS Sales Order Line Description")

Raised when inserting order description lines in a sales shipment, after inserting all the lines. Use it to insert custom comments.

Parameters / Return Value

  • ShipmentLine Record "EOS CWS Shipment Line"

    The first shipment line for the sales order.

  • OrderLineDescriptionSales Enum "EOS006 CWS Sales Order Line Description"


OnBeforeInitSalesLineOnInsertAdditionalOrderDescriptionForInvLineDescription

local procedure OnBeforeInitSalesLineOnInsertAdditionalOrderDescriptionForInvLineDescription(SalesLine: Record "Sales Line"; SalesShipmentLine: Record "Sales Shipment Line"; var NextLineNo: Integer; var IsHandled: Boolean)

Raised before initializing and inserting the sales invoice line with the description “Your Reference + Order No.".

Parameters / Return Value

  • SalesLine Record "Sales Line"

    Sales Line on which to add additional text.

  • SalesShipmentLine Record "Sales Shipment Line"

    Sales Shipment Line linked to Sales Line.

  • NextLineNo Integer

    Next line number to insert.

  • IsHandled Boolean

    If true, it does not insert the sales invoice line.


OnBeforeInsertInvLineDescriptionFromShpt

local procedure OnBeforeInsertInvLineDescriptionFromShpt(SalesShptLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var NextLineNo: Integer; var IsHandled: Boolean)

Raised before initializing and inserting the sales invoice line with the description “CWS Shipment No. + Posting Date”.

Parameters / Return Value

  • SalesShptLine Record "Sales Shipment Line"

    Sales Shipment Line linked to Sales Line.

  • SalesLine Record "Sales Line"

    Sales Line on which to add additional text.

  • NextLineNo Integer

    Next line number to insert.

  • IsHandled Boolean

    If true, it does not insert the sales invoice line.



EOS Labs -