Codeunit 18123180 EOS031 CONAI Mgt.
Codeunit 18123180 EOS031 CONAI Mgt.
Methods
OpenDocumentDetail
procedure OpenDocumentDetail(SourceDocument: Variant)
Parameters / Return Value
- SourceDocument
Variant
OpenDocumentPreview
procedure OpenDocumentPreview(SourceDocument: Variant)
Parameters / Return Value
- SourceDocument
Variant
GetCONAIEnabled
procedure GetCONAIEnabled(TableID: Integer): Boolean
Parameters / Return Value
TableID
Integer
Returns
Boolean
GetCONAISetup
procedure GetCONAISetup(SourceDocument: Variant; MaterialCode: Code[20]; var CONAIPurchaseSaleSetup: Record "EOS031 CONAI Purch/Sale Setup"): Boolean
Parameters / Return Value
SourceDocument
Variant
MaterialCode
Code[20]
CONAIPurchaseSaleSetup
Record "EOS031 CONAI Purch/Sale Setup"
Returns
Boolean
GetCONAILinesMandatoryOnDocument
procedure GetCONAILinesMandatoryOnDocument(SourceDocument: Variant; MaterialCode: Code[20]): Boolean
Parameters / Return Value
SourceDocument
Variant
MaterialCode
Code[20]
Returns
Boolean
GetCONAIDeclarationMandatory
procedure GetCONAIDeclarationMandatory(SourceDocument: Variant; MaterialCode: Code[20]): Boolean
Parameters / Return Value
SourceDocument
Variant
MaterialCode
Code[20]
Returns
Boolean
GetCONAIDeclarationText
procedure GetCONAIDeclarationText(SourceDocument: Variant; MaterialCode: Code[20]): Boolean
Parameters / Return Value
SourceDocument
Variant
MaterialCode
Code[20]
Returns
Boolean
InsertCONAIDeclarationLines
procedure InsertCONAIDeclarationLines(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line")
Parameters / Return Value
SalesHeader
Record "Sales Header"
SalesLine
Record "Sales Line"
GetCONAIExemptionEditable
procedure GetCONAIExemptionEditable(SourceDocument: Variant): Boolean
Parameters / Return Value
SourceDocument
Variant
Returns
Boolean
GetCONAIExemptionEditableError
procedure GetCONAIExemptionEditableError(SourceDocument: Variant; CONAIMaterialCode: Code[10])
Parameters / Return Value
SourceDocument
Variant
CONAIMaterialCode
Code[10]
CalculateDocumentDetail
procedure CalculateDocumentDetail(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
UpdateDetailWithDocumentCONAILines
procedure UpdateDetailWithDocumentCONAILines(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail") CONAIDetailsOnDocument: Boolean
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
Returns
Boolean
UpdateDetailWithCONAILedgerEntries
procedure UpdateDetailWithCONAILedgerEntries(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CreateGroupedDetail
procedure CreateGroupedDetail(var SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
SpreadChangesToDetail
procedure SpreadChangesToDetail(var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Parameters / Return Value
- CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
UpdateDetailWithAmounts
procedure UpdateDetailWithAmounts(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
UpdateContributionFieldsOnGroupedDetail
procedure UpdateContributionFieldsOnGroupedDetail(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; UpdateRecDocumentDetail: Boolean)
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
UpdateRecDocumentDetail
Boolean
IsPostedDocument
procedure IsPostedDocument(SourceDoc: Variant): Boolean
Parameters / Return Value
SourceDoc
Variant
Returns
Boolean
IsEnabledWeightExemptionCalc
procedure IsEnabledWeightExemptionCalc(TableID: Integer): Boolean
Parameters / Return Value
TableID
Integer
Returns
Boolean
DeleteCONAILines
procedure DeleteCONAILines(var SourceDocument: Variant; ShowConfirmation: Boolean): Boolean
Parameters / Return Value
SourceDocument
Variant
ShowConfirmation
Boolean
Returns
Boolean
UpdateCONAILines
procedure UpdateCONAILines(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; ShowRequest: Boolean) LinesChanged: Boolean
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
ShowRequest
Boolean
Returns
Boolean
UpdateCONAILines_PostedDocument
procedure UpdateCONAILines_PostedDocument(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Parameters / Return Value
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
AddOnPostingCONAILines
procedure AddOnPostingCONAILines(SourceDocument: Variant) ReopenDocument: Boolean
Parameters / Return Value
SourceDocument
Variant
Returns
Boolean
TestDocument
procedure TestDocument(SourceDocument: Variant)
Parameters / Return Value
- SourceDocument
Variant
PostDocument
procedure PostDocument(SourceDocument: Variant; PostedDocument: Variant)
Parameters / Return Value
SourceDocument
Variant
PostedDocument
Variant
UpdateLedgersWithAmounts
procedure UpdateLedgersWithAmounts(var CONAILedgerEntry: Record "EOS031 CONAI Ledger Entry"; SkipExemptionPerc: Boolean)
Parameters / Return Value
CONAILedgerEntry
Record "EOS031 CONAI Ledger Entry"
SkipExemptionPerc
Boolean
GetDocumentSignForConaiEntries
procedure GetDocumentSignForConaiEntries(TableID: Integer): Integer
Parameters / Return Value
TableID
Integer
Returns
Integer
CalculateNetAmount
procedure CalculateNetAmount(Quantity: Decimal; UnitAmount: Decimal; Discount: Decimal): Decimal
Parameters / Return Value
Quantity
Decimal
UnitAmount
Decimal
Discount
Decimal
Returns
Decimal
CalculateNetWeight
procedure CalculateNetWeight(Quantity: Decimal; Discount: Decimal): Decimal
Parameters / Return Value
Quantity
Decimal
Discount
Decimal
Returns
Decimal
CalculateNetAmountOnNetWeight
procedure CalculateNetAmountOnNetWeight(Quantity: Decimal; UnitAmount: Decimal): Decimal
Parameters / Return Value
Quantity
Decimal
UnitAmount
Decimal
Returns
Decimal
FromPrimaryKey2Variant
procedure FromPrimaryKey2Variant(TableID: Integer; DocumentType: Integer; DocumentNo: Code[20]; DocumentLine: Integer; var DocumentVariant: Variant)
Parameters / Return Value
TableID
Integer
DocumentType
Integer
DocumentNo
Code[20]
DocumentLine
Integer
DocumentVariant
Variant
OpenCONAIPackageFromItem
procedure OpenCONAIPackageFromItem(var Item: Record Item)
Parameters / Return Value
- Item
Record "Item"
ExcludeConaiCalcErr
procedure ExcludeConaiCalcErr(SourceLine: Variant)
Parameters / Return Value
- SourceLine
Variant
GetCONAIRoundingKg
procedure GetCONAIRoundingKg(var Weight: Decimal)
Parameters / Return Value
- Weight
Decimal
GetDocumentLineConaiAmount
procedure GetDocumentLineConaiAmount(SourceDocument: Variant; ItemNo: Code[20]; ItemVariant: Code[10]; ItemUoM: Code[10]; Quantity: Decimal) ConaiAmount: Decimal
The purpose of this function is to allow everyone to calculate the CONAI Amount for a single line, based on Standard Documents.
Parameters / Return Value
SourceDocument
Variant
The Source Document.
ItemNo
Code[20]
The Item No.
ItemVariant
Code[10]
The Item Variant.
ItemUoM
Code[10]
The Item Unit of Measure.
Quantity
Decimal
The item Quantity.
Returns
Decimal
The calculated CONAI amount.
GetDocumentLineConaiAmount
procedure GetDocumentLineConaiAmount(SourceDocument: Variant; ItemNo: Code[20]; ItemVariant: Code[10]; ItemUoM: Code[10]; Quantity: Decimal; SourceLine: RecordRef) ConaiAmount: Decimal
The purpose of this function is to allow everyone to calculate the CONAI Amount for a single line, based on Standard Documents.
Parameters / Return Value
SourceDocument
Variant
The Source Document.
ItemNo
Code[20]
The Item No.
ItemVariant
Code[10]
The Item Variant.
ItemUoM
Code[10]
The Item Unit of Measure.
Quantity
Decimal
The item Quantity.
SourceLine
RecordRef
The Source Document Line.
Returns
Decimal
The calculated CONAI amount.
AddCONAIDocumentDetailOnSourceDocument
procedure AddCONAIDocumentDetailOnSourceDocument(OnlySetup: Boolean; SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail" temporary; CreateEmptyRecordOnDetail: Boolean)
Parameters / Return Value
OnlySetup
Boolean
SourceDocument
Variant
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CreateEmptyRecordOnDetail
Boolean
GetAdditionalFieldsOnPostedDocument
procedure GetAdditionalFieldsOnPostedDocument(TableID: Integer; DocumentNo: Code[20]; DocumentLineNo: Integer; var TempCONAILedgerEntry: Record "EOS031 CONAI Ledger Entry" temporary)
Parameters / Return Value
TableID
Integer
DocumentNo
Code[20]
DocumentLineNo
Integer
TempCONAILedgerEntry
Record "EOS031 CONAI Ledger Entry"
Events
OnBeforeSetQuantityForConaiAmountCalc
local procedure OnBeforeSetQuantityForConaiAmountCalc(HeaderRef: RecordRef; LineRef: RecordRef; var Quantity: Decimal; var isHandled: Boolean)
Event Raised before the validating of the line amount, can be used to set a different field than quantity.
Parameters / Return Value
HeaderRef
RecordRef
The Header RecordRef.
LineRef
RecordRef
The Line RecordRef.
Quantity
Decimal
The Quantity.
isHandled
Boolean
IsHandled paramenter.
OnBeforeSpreadChangesToDetail
local procedure OnBeforeSpreadChangesToDetail(var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; var IsHandled: Boolean)
Event executed before starting to spread page changes to all lines. Procedure will run if there is at least one line with flags: “Need Spread” = True and “Line No.” = 0
Parameters / Return Value
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The CONAIDocumentDetail that will be processed.
IsHandled
Boolean
Handled parameter.
OnBeforeSpreadMaterialToDetail
local procedure OnBeforeSpreadMaterialToDetail(CONAIMaterials: Record "EOS031 CONAI Materials"; TempCONAIDocumentDetail2: Record "EOS031 CONAI Document Detail"; var IsHandled: Boolean)
Event executed before processing Current Material.
Parameters / Return Value
CONAIMaterials
Record "EOS031 CONAI Materials"
Current CONAI material.
TempCONAIDocumentDetail2
Record "EOS031 CONAI Document Detail"
IsHandled
Boolean
Handled parameter.
OnAfterSpreadMaterialToDetail
local procedure OnAfterSpreadMaterialToDetail(CONAIMaterials: Record "EOS031 CONAI Materials"; var TempCONAIDocumentDetail: Record "EOS031 CONAI Document Detail" temporary)
Event executed after processing current Material and spreading weight.
Example about how primary weight is handled, use this to spread your custom field // Primary Package TempCONAIDocumentDetail2.Reset(); TempCONAIDocumentDetail2.SetRange(“Line No.", 0); TempCONAIDocumentDetail2.SetRange(“CONAI Material Code”, CONAIMaterials.Code); TempCONAIDocumentDetail2.CalcSums(“Primary Weight”); GroupWeight := TempCONAIDocumentDetail2.“Primary Weight”;
TempCONAIDocumentDetail2.Reset(); TempCONAIDocumentDetail2.SetFilter(“Line No.", ‘<>0’); TempCONAIDocumentDetail2.SetRange(“CONAI Material Code”, CONAIMaterials.Code); TempCONAIDocumentDetail2.CalcSums(“Primary Weight”); DetailWeight := TempCONAIDocumentDetail2.“Primary Weight”;
LineCounter := 0;
if (GroupWeight <> DetailWeight) and (DetailWeight <> 0) then begin RemainingWeight := GroupWeight; Ratio := GroupWeight / DetailWeight; LineCount := TempCONAIDocumentDetail2.Count(); if TempCONAIDocumentDetail2.FindSet(true) then repeat LineCounter += 1; if LineCounter < LineCount then begin TempCONAIDocumentDetail2.Validate(“Primary Weight”, Round(TempCONAIDocumentDetail2.“Primary Weight” * Ratio, 0.01)); RemainingWeight -= TempCONAIDocumentDetail2.“Primary Weight”; end else TempCONAIDocumentDetail2.Validate(“Primary Weight”, RemainingWeight); TempCONAIDocumentDetail2.“Need Document Update” := true; TempCONAIDocumentDetail2.Modify(); until TempCONAIDocumentDetail2.Next() = 0 end;
if (GroupWeight <> DetailWeight) and (DetailWeight = 0) then begin RemainingWeight := GroupWeight; LineCount := TempCONAIDocumentDetail2.Count(); if TempCONAIDocumentDetail2.FindSet(true) then repeat LineCounter += 1; if LineCounter < LineCount then begin TempCONAIDocumentDetail2.Validate(“Primary Weight”, Round(GroupWeight * TempCONAIDocumentDetail2.“Spread Ratio”, 0.01)); RemainingWeight -= TempCONAIDocumentDetail2.“Primary Weight”; end else TempCONAIDocumentDetail2.Validate(“Primary Weight”, RemainingWeight); TempCONAIDocumentDetail2.“Need Document Update” := true; TempCONAIDocumentDetail2.Modify(); until TempCONAIDocumentDetail2.Next() = 0 end;
Parameters / Return Value
CONAIMaterials
Record "EOS031 CONAI Materials"
TempCONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
OnBeforeInsertGroupedDetailLine
local procedure OnBeforeInsertGroupedDetailLine(CONAIMaterials: Record "EOS031 CONAI Materials"; var TempCONAIDocumentDetail: Record "EOS031 CONAI Document Detail" temporary)
Event raised before inserting a line with all grouped details.
Parameters / Return Value
CONAIMaterials
Record "EOS031 CONAI Materials"
The current processing material.
TempCONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The line that will be inserted as header line.
OnAfterInsertModifyCONAIDocumentDetailLine
local procedure OnAfterInsertModifyCONAIDocumentDetailLine(var TempCONAIDocumentDetail: Record "EOS031 CONAI Document Detail" temporary; var HeaderRecRef: RecordRef; var LineRecRef: RecordRef)
Event raised before inserting modifing a TempCONAIDocumentDetail line when cycling on LineRecRef.
Parameters / Return Value
TempCONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The line modified or inserted.
HeaderRecRef
RecordRef
The current HeaderRecRef.
LineRecRef
RecordRef
The current LineRecRef.
OnBeforeUpdateConaiLines_PurchaseLine
local procedure OnBeforeUpdateConaiLines_PurchaseLine(PurchaseLine: Record "Purchase Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Event executed before updating puchase line, with values from the CONAIDocumentDetail.
Parameters / Return Value
PurchaseLine
Record "Purchase Line"
The current PurchaseLine.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAIDocumentDetail line.
OnBeforeUpdateCONAILines_SalesLine
local procedure OnBeforeUpdateCONAILines_SalesLine(SalesLine: Record "Sales Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Event executed before updating sales line, with values from the CONAIDocumentDetail.
Parameters / Return Value
SalesLine
Record "Sales Line"
The current CONAI SalesLine.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAIDocumentDetail line.
OnBeforeSetDimensionsCONAILines_SalesLine2
local procedure OnBeforeSetDimensionsCONAILines_SalesLine2(var ConaiSalesLine: Record "Sales Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; SalesLine: Record "Sales Line"; var IsHandled: Boolean)
Event executed before updating dimensions on CONAI sales line.
Parameters / Return Value
ConaiSalesLine
Record "Sales Line"
The current CONAI SalesLine.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAIDocumentDetail line.
SalesLine
Record "Sales Line"
Record “Sales Line”
IsHandled
Boolean
if true, doesn’t set the dimensions
OnBeforeInsertCONAINewLines_SalesLine
local procedure OnBeforeInsertCONAINewLines_SalesLine(var SalesLine: Record "Sales Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Raised before inserting the Conai Sales Line. Use it to modify the Sales Line No.
Parameters / Return Value
SalesLine
Record "Sales Line"
CONAI Sales Line to insert.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAI Document Detail line.
OnBeforeUpdateCONAINewLines_SalesLine
local procedure OnBeforeUpdateCONAINewLines_SalesLine(SalesLine: Record "Sales Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Raised before updating new sales line with values from the CONAIDocumentDetail.
Parameters / Return Value
SalesLine
Record "Sales Line"
The current CONAI Sales Line to update.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAI Document Detail line.
OnBeforeUpdateCONAILines_PostedDocument
local procedure OnBeforeUpdateCONAILines_PostedDocument(CONAILedgerEntry: Record "EOS031 CONAI Ledger Entry"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Event executed before inserting a new CONAILedgerEntry, with values from the CONAIDocumentDetail that fixes the current CONAI ledger entry.
Parameters / Return Value
CONAILedgerEntry
Record "EOS031 CONAI Ledger Entry"
The current CONAILedgerEntry.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAIDocumentDetail line.
OnBeforeUpdateDetailWithExceptionsSetup
local procedure OnBeforeUpdateDetailWithExceptionsSetup(SourceDocument: Variant; CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; var CheckTolerance: Boolean)
Event raised before Updating Detail Lines with Exceptions setup. Allows to disable the check tollerance flag.
Parameters / Return Value
SourceDocument
Variant
Source Document.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail Lines.
CheckTolerance
Boolean
CheckTolerance flag.
OnBeforeUpdateDetailLineWithExceptionsSetup
local procedure OnBeforeUpdateDetailLineWithExceptionsSetup(SourceDocument: Variant; CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; var PercentageTolerance: Decimal)
Event raised before Updating Detail single line with Exceptions setup. Allows to change the PercentageTollerance only for the current line.
Parameters / Return Value
SourceDocument
Variant
Source Document.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail Lines.
PercentageTolerance
Decimal
PercentageTolerance value.
OnBeforeIsSelfBilledDocument
local procedure OnBeforeIsSelfBilledDocument(SourceDocument: Variant; var SelfBilledDocument: Boolean; var IsHandled: Boolean)
Event raised before checking if the document is a self invoice
Parameters / Return Value
SourceDocument
Variant
Source Document.
SelfBilledDocument
Boolean
SelfBilledDocument value.
IsHandled
Boolean
IsHandled paramenter.
OnAfterModifyCONAILines_SalesLine
local procedure OnAfterModifyCONAILines_SalesLine(var SalesLine: Record "Sales Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Event executed after updating an existing Conai sales line, with values from the CONAIDocumentDetail.
Parameters / Return Value
SalesLine
Record "Sales Line"
The current CONAI SalesLine modified.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAIDocumentDetail line.
OnAfterModifyCONAILines_PurchaseLine
local procedure OnAfterModifyCONAILines_PurchaseLine(var PurchaseLine: Record "Purchase Line"; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Event executed after updating an existing Conai purchase line, with values from the CONAIDocumentDetail.
Parameters / Return Value
PurchaseLine
Record "Purchase Line"
The current CONAI PurchaseLine modified.
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
The current CONAIDocumentDetail line.
OnBeforeUpdateCONAILinesOnDocument
local procedure OnBeforeUpdateCONAILinesOnDocument(var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; SourceDocument: Variant; var IsHandled: Boolean)
Raised before insert CONAI Lines on Source Document.
Parameters / Return Value
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail
SourceDocument
Variant
Source Document
IsHandled
Boolean
if true, skip insertion
OnAfterUpdateCONAILinesOnDocument
local procedure OnAfterUpdateCONAILinesOnDocument(var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail"; SourceDocument: Variant)
Raised after update CONAI Lines on Source Document.
Parameters / Return Value
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail
SourceDocument
Variant
Source Document
OnBeforeCONAIDetailMissingErr_OnBeforePost
local procedure OnBeforeCONAIDetailMissingErr_OnBeforePost(SourceDocument: Variant; var IsHandled: Boolean)
Raised before giving Error on posting Sales/Purchase Document, if CONAI Lines are Mandatory.
Parameters / Return Value
SourceDocument
Variant
The Source Document to post
IsHandled
Boolean
if true, skip the error
OnBeforeCONAIDetailMissingErr
local procedure OnBeforeCONAIDetailMissingErr(SourceDocument: Variant; PostedDocument: Variant; var IsHandled: Boolean)
Raised before giving Error on posting Sales/Purchase Document, if CONAI Lines are Mandatory.
Parameters / Return Value
SourceDocument
Variant
The Source Document
PostedDocument
Variant
The Posted Document
IsHandled
Boolean
if true, skip the error
OnBeforeFindSetSourceLines_OnCalculateDocumentDetail
local procedure OnBeforeFindSetSourceLines_OnCalculateDocumentDetail(SourceDocument: Variant; var SourceLines: RecordRef)
Raised before finding Document Lines to consider in CONAI Detail Calculation. Use it to filter Document lines.
Parameters / Return Value
SourceDocument
Variant
The Source Document
SourceLines
RecordRef
Source Lines to filter
OnAfterCalculateDocumentDetail
local procedure OnAfterCalculateDocumentDetail(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Raised after calculate the CONAI Document Detail based on Document Item lines, ignoring the current conai detail already on document.
Parameters / Return Value
SourceDocument
Variant
The Source Document
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail calculated
OnBeforeFindSetSourceLines_OnUpdateDetailWithDocumentCONAILines
local procedure OnBeforeFindSetSourceLines_OnUpdateDetailWithDocumentCONAILines(SourceDocument: Variant; var SourceLines: RecordRef; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Raised before update the CONAI Document Detail with CONAI detail found ON document. Use it to filter Document lines.
Parameters / Return Value
SourceDocument
Variant
The Source Document
SourceLines
RecordRef
Source Lines to filter
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail to update
OnAfterUpdateDetailWithDocumentCONAILines
local procedure OnAfterUpdateDetailWithDocumentCONAILines(SourceDocument: Variant; var CONAIDocumentDetail: Record "EOS031 CONAI Document Detail")
Raised after update the CONAI Document Detail with CONAI detail found ON document.
Parameters / Return Value
SourceDocument
Variant
The Source Document
CONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
CONAI Document Detail updated
OnBeforeFindSetProdBOMLine_OnGetItemWeights
local procedure OnBeforeFindSetProdBOMLine_OnGetItemWeights(var ProductionBOMLine: Record "Production BOM Line"; SourceDocument: Variant)
Raised after filtering the BOM Lines to add to the Conai calculation.
Parameters / Return Value
ProductionBOMLine
Record "Production BOM Line"
Production BOM Lines filtered
SourceDocument
Variant
The Source Document
OnAfterGetItemWeights
local procedure OnAfterGetItemWeights(var CONAIItemPackage: Record "EOS031 CONAI Item Packaging"; ItemNo: Code[20]; VariantCode: Code[10]; UnitOfMeasureCode: Code[10]; var CONAIDocumentDetailBuffer: Record "EOS031 CONAI Document Detail"; SourceDocument: Variant; SourceLine: RecordRef)
Raised after modify Weights on CONAI Document Detail Buffer from the Item Packaging.
Parameters / Return Value
CONAIItemPackage
Record "EOS031 CONAI Item Packaging"
Record “EOS031 CONAI Item Packaging” found
ItemNo
Code[20]
ItemNo filter on Record “EOS031 CONAI Item Packaging”
VariantCode
Code[10]
VariantCode filter on Record “EOS031 CONAI Item Packaging”
UnitOfMeasureCode
Code[10]
UnitOfMeasureCode filter on Record “EOS031 CONAI Item Packaging”
CONAIDocumentDetailBuffer
Record "EOS031 CONAI Document Detail"
CONAI Document Detail Buffer to modify
SourceDocument
Variant
The Source Document
SourceLine
RecordRef
The Source Document Line
OnBeforeModifyWeightsFromCONAIPackagingBOM
local procedure OnBeforeModifyWeightsFromCONAIPackagingBOM(var CONAIDocumentDetailBuffer: Record "EOS031 CONAI Document Detail"; CONAIPackagingBOM: Record "EOS031 CONAI Packaging BOM"; SourceDocument: Variant; var IsHandled: Boolean; SourceLine: RecordRef)
Raised before sum weights of the CONAI Packaging BOM to the Record CONAI Document Detail.
Parameters / Return Value
CONAIDocumentDetailBuffer
Record "EOS031 CONAI Document Detail"
Record CONAI Document Detail to modify
CONAIPackagingBOM
Record "EOS031 CONAI Packaging BOM"
Current Line CONAI Packaging BOM to get the Weights from
SourceDocument
Variant
The Source Document
IsHandled
Boolean
if true, doesn’t sum weights to the Record CONAI Document Detail
SourceLine
RecordRef
The Source Document Line
OnAfterUpdateDetailWithAmounts
local procedure OnAfterUpdateDetailWithAmounts(SourceDocument: Variant; var CONAIDocumentDetailBuffer: Record "EOS031 CONAI Document Detail" temporary)
Raised after updating amounts on Conai Buffer for documents not posted.
Parameters / Return Value
SourceDocument
Variant
The Source Document
CONAIDocumentDetailBuffer
Record "EOS031 CONAI Document Detail"
Buffer CONAI Document Detail updated
OnBeforeInsertCONAIDocumentDetailFromSourceLine
local procedure OnBeforeInsertCONAIDocumentDetailFromSourceLine(var TempCONAIDocumentDetail: Record "EOS031 CONAI Document Detail" temporary; var TempCONAIDocumentDetailBuffer: Record "EOS031 CONAI Document Detail" temporary; HeaderRecRef: RecordRef; LineRecRef: RecordRef)
Raised before insert the Conai detailed line with the weights calculated on the source line.
Parameters / Return Value
TempCONAIDocumentDetail
Record "EOS031 CONAI Document Detail"
New Record CONAI Document Detail to insert
TempCONAIDocumentDetailBuffer
Record "EOS031 CONAI Document Detail"
Current Record with weights calculated from standard
HeaderRecRef
RecordRef
The Header RecordRef
LineRecRef
RecordRef
The current LineRecRef
OnAfterSetFiltersOnCONAIItemPackaging_OnGetItemWeights
local procedure OnAfterSetFiltersOnCONAIItemPackaging_OnGetItemWeights(var CONAIItemPackaging: Record "EOS031 CONAI Item Packaging"; ItemNo: Code[20]; VariantCode: Code[10]; UnitOfMeasureCode: Code[10]; var CONAIDocumentDetailBuffer: Record "EOS031 CONAI Document Detail"; SourceDocument: Variant; SourceLine: RecordRef)
Raised in the procedure “GetItemWeights” to find the weights of the materials, assigned to the Item Packaging. It is raised after set filters on the CONAI Item Packaging. Use it to modify filters.
Parameters / Return Value
CONAIItemPackaging
Record "EOS031 CONAI Item Packaging"
Record “EOS031 CONAI Item Packaging” to filter
ItemNo
Code[20]
ItemNo filter on Record “EOS031 CONAI Item Packaging”
VariantCode
Code[10]
VariantCode filter on Record “EOS031 CONAI Item Packaging”
UnitOfMeasureCode
Code[10]
UnitOfMeasureCode filter on Record “EOS031 CONAI Item Packaging”
CONAIDocumentDetailBuffer
Record "EOS031 CONAI Document Detail"
CONAI Document Detail Buffer to modify with the weights of the Item Packaging
SourceDocument
Variant
The Source Document
SourceLine
RecordRef
The Source Document Line
OnInsertCONAIDeclarationLines
local procedure OnInsertCONAIDeclarationLines(SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
Raised on insert the generic Conai text. Use it to skip insert.
Parameters / Return Value
SalesHeader
Record "Sales Header"
The Sales Header
IsHandled
Boolean
if true, not insert the CONAI Declaration Line
OnBeforeInsertCONAIDeclarationLines
local procedure OnBeforeInsertCONAIDeclarationLines(var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header")
Raised before insert the Sales Line with the generic Conai text. Use it to modify it.
Parameters / Return Value
SalesLine
Record "Sales Line"
Sales line to insert
SalesHeader
Record "Sales Header"
The Sales Header
OnAfterGetAdditionalDetails
local procedure OnAfterGetAdditionalDetails(SourceDocument: Variant; var CustomerVendorNo: Code[20]; var CountryCode: Code[10]; var PostingDate: Date)
Raised after get the additional details from the source document.
Parameters / Return Value
SourceDocument
Variant
The Source Document
CustomerVendorNo
Code[20]
The Source Customer/Vendor No.
CountryCode
Code[10]
The Country Code
PostingDate
Date
The Posting Date
OnDeleteSalesLineForDocumentType
local procedure OnDeleteSalesLineForDocumentType(var SalesLine: Record "Sales Line")
Raised on delete sales conai lines according to the document type.
Parameters / Return Value
SalesLine
Record "Sales Line"
Current Sales Line
OnBeforeFilterSalesLineOnDeleteConaiLines
local procedure OnBeforeFilterSalesLineOnDeleteConaiLines(SourceID: Integer; SourceType: Integer; SourceNo: Code[20])
Raised before filter sales lines to delete the conai lines.
Parameters / Return Value
SourceID
Integer
Source table ID
SourceType
Integer
Source Document Type
SourceNo
Code[20]
Source Document No
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.