Report 18122110 EOS Combine Shipments
Report 18122110 EOS Combine Shipments
Language | Caption |
---|---|
da-DK | Erweiterter Kombinierter Versand (ECS) |
de-DE | Erweiterter Kombinierter Versand (ECS) |
es-ES | Generación de facturas (ECS) |
fr-FR | Étendue Combiner les expéditions (ECS) |
en-US | Extended Combine Shipments (ECS) |
it-IT | Fatt. Cumulative Estese (ECS) |
nl-NL | Uitgebreide combineren verzending (ECS) |
Methods
GetInvoices
procedure GetInvoices(var TempOutSalesHeader: Record "Sales Header")
Returns the invoices that have been created by the last run.
Parameters / Return Value
- TempOutSalesHeader
Record "Sales Header"
SetParameters
procedure SetParameters(pRefDate: Date; pInvMethodCode: Code[10])
Parameters / Return Value
pRefDate
Date
pInvMethodCode
Code[10]
SetParameters
procedure SetParameters(pRefDate: Date; pInvMethodCode: Code[10]; pSuppressMessage: Boolean)
Parameters / Return Value
pRefDate
Date
pInvMethodCode
Code[10]
pSuppressMessage
Boolean
SetParameters
procedure SetParameters(pRefDate: Date; pInvMethodCode: Code[10]; pSuppressMessage: Boolean; pDefPostingDate: Date; pDefOperationOccuredDate: Date)
Parameters / Return Value
pRefDate
Date
pInvMethodCode
Code[10]
pSuppressMessage
Boolean
pDefPostingDate
Date
pDefOperationOccuredDate
Date
SetParameters
procedure SetParameters(pRefDate: Date; pInvMethodCode: Code[10]; pSuppressMessage: Boolean; pDefPostingDate: Date; pDefOperationOccuredDate: Date; pCopyTextLine: Boolean; pEnableSchedule: Boolean)
Parameters / Return Value
pRefDate
Date
pInvMethodCode
Code[10]
pSuppressMessage
Boolean
pDefPostingDate
Date
pDefOperationOccuredDate
Date
pCopyTextLine
Boolean
pEnableSchedule
Boolean
SetParameters
procedure SetParameters(pRefDate: Date; pInvMethodCode: Code[10]; pSuppressMessage: Boolean; pDefPostingDate: Date; pDefOperationOccuredDate: Date; pCopyTextLine: Boolean; pEnableSchedule: Boolean; pSessionID: Guid)
Parameters / Return Value
pRefDate
Date
pInvMethodCode
Code[10]
pSuppressMessage
Boolean
pDefPostingDate
Date
pDefOperationOccuredDate
Date
pCopyTextLine
Boolean
pEnableSchedule
Boolean
pSessionID
Guid
GetElectrDocType
procedure GetElectrDocType(): Code[5]
Parameters / Return Value
- Returns
Code[5]
SetElectrDocType
procedure SetElectrDocType(pElectrDocType: Code[5])
Parameters / Return Value
- pElectrDocType
Code[5]
Events
OnAfterFinalizeInvoiceHeader
local procedure OnAfterFinalizeInvoiceHeader(var SalesHeader: Record "Sales Header"; var TempGroupFields: Record "Field")
Occurrs after the invoice has been completely prepared
Parameters / Return Value
SalesHeader
Record "Sales Header"
The Sales Header of the invoice prepared
TempGroupFields
Record "Field"
The list of the group fields.
OnAfterCreateInvoiceHeader
local procedure OnAfterCreateInvoiceHeader(var SalesHeader: Record "Sales Header"; var TempGroupFields: Record "Field")
Occurrs after the invoice header has been inserted but before any lines are added.
Parameters / Return Value
SalesHeader
Record "Sales Header"
The Sales Header of the invoice prepared
TempGroupFields
Record "Field"
The list of the group fields.
OnBeforeInsertInvLineFromShptLine
local procedure OnBeforeInsertInvLineFromShptLine(SalesShipLine: Record "Sales Shipment Line"; var Skip: Boolean; var TempGroupFields: Record "Field")
Event raised on before the processing of a single Sales Shipment Line
Parameters / Return Value
SalesShipLine
Record "Sales Shipment Line"
The Sales Shipment Line that will be processed
Skip
Boolean
Set to TRUE to skip the processing of the Sales Shipment Line
TempGroupFields
Record "Field"
The list of the group fields.
OnAfterInsertInvLineFromShptLine
local procedure OnAfterInsertInvLineFromShptLine(SalesShipLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var TempGroupFields: Record "Field")
Event raised on after the processing of a single Sales Shipment Line
Parameters / Return Value
SalesShipLine
Record "Sales Shipment Line"
The Sales Shipment Line that has been processed
SalesLine
Record "Sales Line"
The Sales Line created
TempGroupFields
Record "Field"
The list of the group fields.
OnAfterInsertLastLineOfShipment
local procedure OnAfterInsertLastLineOfShipment(SalesShipLine: Record "Sales Shipment Line"; var SalesLine: Record "Sales Line"; var TempGroupFields: Record "Field")
Event raised on after the processing of all the lines of a Sales Shipment, in the current Invoice WARNING: if the invoicing method include a Document Line field as grouping option, this event will be called many times, as equal the number of invoices in which it has been split.
Parameters / Return Value
SalesShipLine
Record "Sales Shipment Line"
The Sales Shipment Line that has been processed
SalesLine
Record "Sales Line"
The last Sales Line created
TempGroupFields
Record "Field"
The list of the group fields.
OnAfterInsertInvoice
local procedure OnAfterInsertInvoice(var SalesHeader: Record "Sales Header"; ElectrDocType: Code[5]; var TempGroupFields: Record "Field")
Event raised on after the processing of all the lines of the entity of a group. In this event the sales header has been completely created and is possible to edit it. After this event a COMMIT will be executed.
Parameters / Return Value
SalesHeader
Record "Sales Header"
The Sales Header created
ElectrDocType
Code[5]
The ElectrDocType enable with app “Extended Combine Shipment for FTE for Italy”
TempGroupFields
Record "Field"
The list of the group fields.
onAfter_PopulateHeaderValuesBuffer
local procedure onAfter_PopulateHeaderValuesBuffer(SalesShptHeader: Record "Sales Shipment Header"; var SalesOrderHeader: Record "Sales Header"; InvMethodCode: Code[10]; var TempGroupFields: Record "Field")
Event raised before the invoice header is created. Used to move SalesShptHeader fields to SalesOrderHeader.
Parameters / Return Value
SalesShptHeader
Record "Sales Shipment Header"
The Sales Shipment Header, got from the first Sales Shipment Line processed
SalesOrderHeader
Record "Sales Header"
The Sales Order Header, got from the
InvMethodCode
Code[10]
TempGroupFields
Record "Field"
The list of the group fields.
IsItalianLinkAppInstalled
local procedure IsItalianLinkAppInstalled(var ItalianFieldsVisible: Boolean)
Internal use only
Parameters / Return Value
- ItalianFieldsVisible
Boolean
OnInsertItalianAppFields
local procedure OnInsertItalianAppFields(var SalesInvHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var TempGroupFields: Record Field temporary; OperationOccuredDate: Date)
Internal use only
Parameters / Return Value
SalesInvHeader
Record "Sales Header"
The Sales Header created
SalesShptHeader
Record "Sales Shipment Header"
The Sales Shipment Header, got from the first Sales Shipment Line processed
SalesOrderHeader
Record "Sales Header"
The Sales Order Header created
TempGroupFields
Record "Field"
The list of the group fields.
OperationOccuredDate
Date
Contains the “Operation occured date” for the invoice
OnInsertSalesInvHeaderFields
local procedure OnInsertSalesInvHeaderFields(var SalesInvHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header"; SalesOrderHeader: Record "Sales Header"; var TempGroupFields: Record "Field")
Event raised to modify the sales invoice header fields, and manage custom ones.
Parameters / Return Value
SalesInvHeader
Record "Sales Header"
The Sales Header created
SalesShptHeader
Record "Sales Shipment Header"
The Sales Shipment Header, got from the first Sales Shipment Line processed
SalesOrderHeader
Record "Sales Header"
The Sales Order Header created
TempGroupFields
Record "Field"
The list of the group fields.
IsElectronicInvoiceLinkAppInstalled
local procedure IsElectronicInvoiceLinkAppInstalled(var ElectrDocTypeEnabled: Boolean)
Internal use only
Parameters / Return Value
- ElectrDocTypeEnabled
Boolean
OnLookupElectrDocTypeFld
local procedure OnLookupElectrDocTypeFld(var ElectrDocType: Code[5])
Internal use only
Parameters / Return Value
- ElectrDocType
Code[5]
OnBeforeAddDocumentLineToBuffer
local procedure OnBeforeAddDocumentLineToBuffer(SalesShptHeader: Record "Sales Shipment Header"; SalesShptLine: Record "Sales Shipment Line"; var Handled: Boolean)
Event executed before processing the current Sales Shipment Line, to use to avoid grouping. The skipped line will not apear in the created invoices.
Parameters / Return Value
SalesShptHeader
Record "Sales Shipment Header"
The Sales Shipment Header.
SalesShptLine
Record "Sales Shipment Line"
The Sales Shipment Line.
Handled
Boolean
Handled paramenter.
OnCalculateHash_GetCustomField
local procedure OnCalculateHash_GetCustomField(TableNo: Integer; FieldNo: Integer; SalesShptHeader: Record "Sales Shipment Header"; SalesShptLine: Record "Sales Shipment Line"; SalesOrderHeader: Record "Sales Header"; FieldValue: Text)
Event executed when calculating the hash. Use to manage fields on tables that are not “Sales Shipment Header”, “Sales Shipment Line”, “Sales Header”, “Order”.
Parameters / Return Value
TableNo
Integer
The table from which to retrieve data.
FieldNo
Integer
The field from which to get the data.
SalesShptHeader
Record "Sales Shipment Header"
The current Sales Shipment Header.
SalesShptLine
Record "Sales Shipment Line"
The current Sales Shipment Line.
SalesOrderHeader
Record "Sales Header"
The current Sales Order Header (Order).
FieldValue
Text[]
The field value to return. Format(FieldValue, 0, 9) is strongly encouraged.
OnBeforeGetFieldValueHash
local procedure OnBeforeGetFieldValueHash(TempGroupFields: Record Field temporary; SalesShptLine: Record "Sales Shipment Line"; SalesShptHeader: Record "Sales Shipment Header"; SalesHeader: Record "Sales Header"; var FieldValue: Text; var IsHandled: Boolean)
Event raised to manage custom value in the grouping procedure.
Parameters / Return Value
TempGroupFields
Record "Field"
The field to process.
SalesShptLine
Record "Sales Shipment Line"
The source sales shipment line.
SalesShptHeader
Record "Sales Shipment Header"
The source sales shipment header.
SalesHeader
Record "Sales Header"
The source sales order header.
FieldValue
Text[]
Return field value.
IsHandled
Boolean
Handled parameter to skip custom procedure
OnBeforeCreateInvoices
local procedure OnBeforeCreateInvoices(var HashList: List of [Text]; var TempECSBuffer: Record "EOS ECS Buffer" temporary)
Event raised before creating invoices. Allows use to edit HashList and TempECSBuffer to modify grouping.
Parameters / Return Value
HashList
List[Text]
Hash array that contains one single value for each calculated hash (1 hash = 1 invoice)
TempECSBuffer
Record "EOS ECS Buffer"
The ECS buffer with all lines that will be added to the invoices that will be created.
OnAfterInitSalesInvoiceHeader
local procedure OnAfterInitSalesInvoiceHeader(var FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header")
Event raised after initializing Sales Header record Allows to inherit fields
Parameters / Return Value
FromSalesHeader
Record "Sales Header"
Current Sales Order Header
ToSalesHeader
Record "Sales Header"
Sales Header in Invoice
OnBeforeInsertSalesInvoiceHeader
local procedure OnBeforeInsertSalesInvoiceHeader(var FromSalesHeader: Record "Sales Header"; var ToSalesHeader: Record "Sales Header")
Event raised before inserting Sales Header lines
Parameters / Return Value
FromSalesHeader
Record "Sales Header"
Current Sales Order Header
ToSalesHeader
Record "Sales Header"
Sales Header in Invoice
OnBeforeProcessHash
local procedure OnBeforeProcessHash(Hash: Text; var TempECSBuffer: Record "EOS ECS Buffer" temporary)
Event executed before process a single hash line to allow update of SortingLineNo field. Allows to reorder the ECS buffer. Default “Sorting Line No” value is 100000. Warning: keep all lines of a shipment together, otherwise OnAfterInsertLastLineOfShipment will be called more than one time per shipment
Parameters / Return Value
Hash
Text[]
The current hash that will be processed.
TempECSBuffer
Record "EOS ECS Buffer"
The ECS Buffer with filters inserted, hash filter is applied after the event.
OnCreateSalesInvHeader_OnBeforeValidateSellToBillTo
local procedure OnCreateSalesInvHeader_OnBeforeValidateSellToBillTo(SalesOrderHeader: Record "Sales Header"; var SalesInvHeader: Record "Sales Header"; InvMethod: Record "EOS Invoicing Method"; var isHandled: Boolean)
Raised before validating Sell-to Customer No. and Bill-to Customer No. during the generation of an Invoice from ECS
Parameters / Return Value
SalesOrderHeader
Record "Sales Header"
Sales Order which the Invoice is being generated from
SalesInvHeader
Record "Sales Header"
Sales Invoice Header that is being generated
InvMethod
Record "EOS Invoicing Method"
ECS Invoicing Method
isHandled
Boolean
if set to true skips the ECS validation of fields Sell-to Customer No. and Bill-to Customer No.
OnAfterHandleReasonCode
local procedure OnAfterHandleReasonCode(SalesOrderHeader: Record "Sales Header"; SalesShptHeader: Record "Sales Shipment Header"; var SalesInvHeaderReasonCode: Code[10])
Raised when determining the reason code to be applied to the sales header - if any.
Parameters / Return Value
SalesOrderHeader
Record "Sales Header"
The sales order header.
SalesShptHeader
Record "Sales Shipment Header"
The sales shipment header.
SalesInvHeaderReasonCode
Code[10]
The reason code to be applied to sales invoice header. This value will be pre-filled according to the reason code set on the sales order header or shipment header and whether the invoicing method is set to group by reason code.
OnSelectInvMethodCode
local procedure OnSelectInvMethodCode(Customer: Record Customer; var InvMethodCode: Code[10])
Allows to modify the invoice method code before the customer is processed.
Parameters / Return Value
Customer
Record "Customer"
Current Customer
InvMethodCode
Code[10]
The InvMethodCode used.
OnInsertRequestPageFieldsAsJson
local procedure OnInsertRequestPageFieldsAsJson(var JsonTextReaderWriter: Codeunit System.IO."Json Text Reader/Writer")
Allows to save the request page fields in the JSON format for the scheduling procedure. Use JsonTextReaderWriter.WriteStringProperty to save your custom fields.
Parameters / Return Value
- JsonTextReaderWriter
Codeunit "System.IO."Json Text Reader/Writer""
OnBeforeShowErrorConfirm
local procedure OnBeforeShowErrorConfirm(showConfirm: Boolean)
Event raised before showing the error message in GUI mode. Allows to directly show the error message and block the user from continuing.
Parameters / Return Value
- showConfirm
Boolean
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.