Codeunit 18004123 EOS G/L Accruals Management
Codeunit 18004123 EOS G/L Accruals Management
Methods
ShowPreview
procedure ShowPreview(var GLAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
- GLAccrEntry
Record "EOS G/L Accrual Entry"
GetTemplate
procedure GetTemplate("Code": Code[20])
Parameters / Return Value
- Code
Code[20]
SplitLine
procedure SplitLine(var TmpGlAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
- TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
PostGlEntryAccrualYesNo
procedure PostGlEntryAccrualYesNo(GlEntry: Record "G/L Entry"; var TmpGLAccrEntry: Record "EOS G/L Accrual Entry"): Boolean
Parameters / Return Value
GlEntry
Record "G/L Entry"
TmpGLAccrEntry
Record "EOS G/L Accrual Entry"
Returns
Boolean
PostGlEntryAccrual
procedure PostGlEntryAccrual(GlEntry: Record "G/L Entry"; var TmpGLAccrEntry: Record "EOS G/L Accrual Entry"): Boolean
Parameters / Return Value
GlEntry
Record "G/L Entry"
TmpGLAccrEntry
Record "EOS G/L Accrual Entry"
Returns
Boolean
UndoAccrual
procedure UndoAccrual(var GLAccrualEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
- GLAccrualEntry
Record "EOS G/L Accrual Entry"
UndoAccrual
procedure UndoAccrual(var GLAccrualEntry: Record "EOS G/L Accrual Entry"; HideDialog: Boolean)
Parameters / Return Value
GLAccrualEntry
Record "EOS G/L Accrual Entry"
HideDialog
Boolean
CloseAccrual
procedure CloseAccrual(var GLAccrEntry: Record "EOS G/L Accrual Entry"; var TmpGenJnlLine: Record "Gen. Journal Line"; EndingDate: Date; DocumentNo: Code[20]): Boolean
Parameters / Return Value
GLAccrEntry
Record "EOS G/L Accrual Entry"
TmpGenJnlLine
Record "Gen. Journal Line"
EndingDate
Date
DocumentNo
Code[20]
Returns
Boolean
MarkGLAccrEntriesClosed
procedure MarkGLAccrEntriesClosed(GenJnlLine: Record "Gen. Journal Line"; GLEntry: Record "G/L Entry")
Parameters / Return Value
GenJnlLine
Record "Gen. Journal Line"
GLEntry
Record "G/L Entry"
CheckDocument
procedure CheckDocument(SalesHeader: Record "Sales Header")
Parameters / Return Value
- SalesHeader
Record "Sales Header"
CheckDocument
procedure CheckDocument(PurchHeader: Record "Purchase Header")
Parameters / Return Value
- PurchHeader
Record "Purchase Header"
CheckAccrualValid
procedure CheckAccrualValid(TmpGlAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
- TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
CheckDocLineAccrualValid
procedure CheckDocLineAccrualValid(StartingDate: Date; EndingDate: Date; TemplateCode: Code[10]; Period: Enum "EOS Accrual Period Type"; WithError: Boolean): Boolean
Parameters / Return Value
StartingDate
Date
EndingDate
Date
TemplateCode
Code[10]
Period
Enum "EOS Accrual Period Type"
WithError
Boolean
Returns
Boolean
CalcGlAccrualEntryFromGlEntry
procedure CalcGlAccrualEntryFromGlEntry(GlEntry: record "G/L Entry"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
GlEntry
record "G/L Entry"
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
CalcGlAccrualEntryFromGlEntry
procedure CalcGlAccrualEntryFromGlEntry(GlEntry: record "G/L Entry"; AccrualsParameters: Record "EOS G/L Accrual Entry"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
GlEntry
record "G/L Entry"
AccrualsParameters
Record "EOS G/L Accrual Entry"
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
CreateGLAccrualEntry
procedure CreateGLAccrualEntry(SalesHeader: record "Sales Header"; var TmpGLAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
SalesHeader
record "Sales Header"
TmpGLAccrEntry
Record "EOS G/L Accrual Entry"
FindAccrualAccountNo
procedure FindAccrualAccountNo(SalesLine: Record "Sales Line"): Code[20]
Parameters / Return Value
SalesLine
Record "Sales Line"
Returns
Code[20]
FindAccrualAccountNo
procedure FindAccrualAccountNo(PurchLine: Record "Purchase Line"): Code[20]
Parameters / Return Value
PurchLine
Record "Purchase Line"
Returns
Code[20]
FindGlAccountNo
procedure FindGlAccountNo(SalesPurch: Option Sales,Purchase;Type: Integer;No: Code[20];GenBusPostingGroup: Code[20];GenProdPostingGroup: Code[20]): Code[20]
Parameters / Return Value
SalesPurch
Option
Sales
(0) ,Purchase
(1)Type
Integer
No
Code[20]
GenBusPostingGroup
Code[20]
GenProdPostingGroup
Code[20]
Returns
Code[20]
SetGLRegJournalBatchName
procedure SetGLRegJournalBatchName(GLAccrEntryEntryNo: Integer) JournalBatchName: code[10]
Parameters / Return Value
GLAccrEntryEntryNo
Integer
Returns
code[10]
UndoRelatedAccrual
Obsolete
Pending: No longer available. (21.0)procedure UndoRelatedAccrual(RegNo: Integer; CheckOnly: Boolean; Hidedialog: Boolean) ReverseAccruals: Boolean
Parameters / Return Value
RegNo
Integer
CheckOnly
Boolean
Hidedialog
Boolean
Returns
Boolean
Events
OnBeforeFindRelatedAccrualEntry
local procedure OnBeforeFindRelatedAccrualEntry(RegNo: Integer; var EOSGLAccrualEntry: Record "EOS G/L Accrual Entry"; var AccrualEntryFound: Boolean; var IsHandled: Boolean)
This event is raised when a G/L register is reversed, before standard app try to find if selected register has an Accrual entry related.
Parameters / Return Value
RegNo
Integer
Register No. you’re reversing.
EOSGLAccrualEntry
Record "EOS G/L Accrual Entry"
Accrual entry found as related to the register.
AccrualEntryFound
Boolean
Treu means that an Accrual entry has been found.
IsHandled
Boolean
Standard app code will be skipped.
OnAfterFindRelatedAccrualEntry
local procedure OnAfterFindRelatedAccrualEntry(RegNo: Integer; var EOSGLAccrualEntry: Record "EOS G/L Accrual Entry"; var AccrualEntryFound: Boolean)
This event is raised when a G/L register is reversed, after standard app tried to find if selected register has an Accrual entry related.
Parameters / Return Value
RegNo
Integer
Register No. you’re reversing.
EOSGLAccrualEntry
Record "EOS G/L Accrual Entry"
Accrual entry found as related to the register.
AccrualEntryFound
Boolean
true means that an Accrual entry has been found.
OnRelatedAccrualEntryReverseCheck
local procedure OnRelatedAccrualEntryReverseCheck(EOSGLAccrualEntry: Record "EOS G/L Accrual Entry"; var Severity: Option Message,Confirm,Error,Nothing; var ReverseAccruals: Boolean)
This event is raised when a G/L register is reversed, and a related Accrual entry has been found. System raises error, confirm, message or nothing depending on set severity.
Parameters / Return Value
EOSGLAccrualEntry
Record "EOS G/L Accrual Entry"
Accrual entry found as related to the register.
Severity
Option
Message
(0) ,Confirm
(1) ,Error
(2) ,Nothing
(3)Specifies if system must raise error, confirm, message or nothing.
ReverseAccruals
Boolean
true means that related Accrual entry will be reversed.
OnUpdateSourceRecord
Obsolete
Pending: No longer used. (24.0)local procedure OnUpdateSourceRecord(GlAccrEntry: Record "EOS G/L Accrual Entry")
Parameters / Return Value
- GlAccrEntry
Record "EOS G/L Accrual Entry"
OnBeforeFindTmpClosingGenJnlLine
local procedure OnBeforeFindTmpClosingGenJnlLine(GLAccrEntry: Record "EOS G/L Accrual Entry";var TmpClosingGenJnlLine: Record "Gen. Journal Line";TmpGLEntry: Record "G/L Entry";DocumentNo: Code[20];EndingDate: Date)
Parameters / Return Value
GLAccrEntry
Record "EOS G/L Accrual Entry"
TmpClosingGenJnlLine
Record "Gen. Journal Line"
TmpGLEntry
Record "G/L Entry"
DocumentNo
Code[20]
EndingDate
Date
OnBeforeInsertTmpClosingGenJnlLine
local procedure OnBeforeInsertTmpClosingGenJnlLine(var TmpClosingGenJnlLine: Record "Gen. Journal Line";GLAccrEntry: Record "EOS G/L Accrual Entry";TmpGLEntryBuffer: Record "G/L Entry")
Parameters / Return Value
TmpClosingGenJnlLine
Record "Gen. Journal Line"
GLAccrEntry
Record "EOS G/L Accrual Entry"
TmpGLEntryBuffer
Record "G/L Entry"
OnAfterInsertTmpClosingGenJnlLine
local procedure OnAfterInsertTmpClosingGenJnlLine(var TmpClosingGenJnlLine: Record "Gen. Journal Line";GLAccrEntry: Record "EOS G/L Accrual Entry";TmpGLEntryBuffer: Record "G/L Entry")
Parameters / Return Value
TmpClosingGenJnlLine
Record "Gen. Journal Line"
GLAccrEntry
Record "EOS G/L Accrual Entry"
TmpGLEntryBuffer
Record "G/L Entry"
OnAfterUpdateTmpClosingGenJnlLine
local procedure OnAfterUpdateTmpClosingGenJnlLine(var TmpClosingGenJnlLine: Record "Gen. Journal Line";GLAccrEntry: Record "EOS G/L Accrual Entry";TmpGLEntryBuffer: Record "G/L Entry")
Parameters / Return Value
TmpClosingGenJnlLine
Record "Gen. Journal Line"
GLAccrEntry
Record "EOS G/L Accrual Entry"
TmpGLEntryBuffer
Record "G/L Entry"
OnAfterCalcAccrualAmount
local procedure OnAfterCalcAccrualAmount(DocumentVariant: Variant; VatPostingSetup: Record "VAT Posting Setup"; AmountInclVat: Decimal; AmountExclVat: Decimal; CurrFactor: Decimal; var AccrAmount: Decimal)
Parameters / Return Value
DocumentVariant
Variant
VatPostingSetup
Record "VAT Posting Setup"
AmountInclVat
Decimal
AmountExclVat
Decimal
CurrFactor
Decimal
AccrAmount
Decimal
OnAfterLinkToGlEntry
local procedure OnAfterLinkToGlEntry(GlAccrEntry: Record "EOS G/L Accrual Entry"; GlEntry: Record "G/L Entry")
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
GlEntry
Record "G/L Entry"
OnBeforeInsertGlAccrualEntry
local procedure OnBeforeInsertGlAccrualEntry(var GlAccrEntry: Record "EOS G/L Accrual Entry"; SourceRecord: Variant)
This event is raised before a G/L accrual entry that is calculated from a source document line is written to the database.
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
The G/L Accrual Entry that is being inserted.
SourceRecord
Variant
The source record (or line) that is generating the accrual entry.
OnAfterInsertGlAccrualEntry
local procedure OnAfterInsertGlAccrualEntry(var GlAccrEntry: Record "EOS G/L Accrual Entry"; SourceRecord: Variant)
This event is raised after a G/L accrual entry that is calculated from a source document line is written to the database.
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
The G/L Accrual Entry that is being inserted.
SourceRecord
Variant
The source record (or line) that is generating the accrual entry.
OnAfterPrepareAccrualGenJnlLine
local procedure OnAfterPrepareAccrualGenJnlLine(GlAccrEntry: Record "EOS G/L Accrual Entry"; var TmpGenJnlLine: Record "Gen. Journal Line")
This event is raised after a GenJnlLine, that is generated from posting a G/L accrual entry, has been prepared and before it is inserted to the buffer that will be posted.
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
The G/L Accrual Entry that is being posted.
TmpGenJnlLine
Record "Gen. Journal Line"
The journal line that has been prepared.
OnBeforePostAccrualGenJnlLine
local procedure OnBeforePostAccrualGenJnlLine(GlAccrEntry: Record "EOS G/L Accrual Entry"; var GenJnlLine: Record "Gen. Journal Line")
This event is raised before a GenJnlLine, that is generated from posting a G/L accrual entry, is posted.
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
The G/L Accrual Entry that is being posted.
GenJnlLine
Record "Gen. Journal Line"
The journal line that will be posted.
OnBeforeCreateBuffer
local procedure OnBeforeCreateBuffer(GlAccrEntry: Record "EOS G/L Accrual Entry"; var TmpGLEntry: Record "G/L Entry"; var IsHandled: Boolean; var Return: Boolean)
This event is raised before a buffer base on G/L Entry is created. This buffer will have one record for each line that will be posted based on accruale template setup.
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
The G/L Accrual Entry that is being posted.
TmpGLEntry
Record "G/L Entry"
Buffer containing detailed lines based on template settings.
IsHandled
Boolean
No folowing standard code will be executed.
Return
Boolean
Return boolean param of the function.
OnAfterCreateBuffer
local procedure OnAfterCreateBuffer(GlAccrEntry: Record "EOS G/L Accrual Entry"; var TmpGLEntry: Record "G/L Entry"; var Return: Boolean)
This event is raised after a buffer base on G/L Entry is created. This buffer will have one record for each line that will be posted based on accruale template setup.
Parameters / Return Value
GlAccrEntry
Record "EOS G/L Accrual Entry"
The G/L Accrual Entry that is being posted.
TmpGLEntry
Record "G/L Entry"
Buffer containing detailed lines based on template settings.
Return
Boolean
Return boolean param of the function.
OnBeforeCreateGLAccrualEntry
Obsolete
Pending: Use OnBeforeCreateGLAccrualEntry_GenJnlLine (21.0)local procedure OnBeforeCreateGLAccrualEntry(GenJnlLine: Record "Gen. Journal Line"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry"; Handled: Boolean)
OBSOLETE
Parameters / Return Value
GenJnlLine
Record "Gen. Journal Line"
Current Journal line
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
Custom Accrual Entry
Handled
Boolean
Return true to skip standard Accrual creation
OnBeforeCreateGLAccrualEntry_GenJnlLine
local procedure OnBeforeCreateGLAccrualEntry_GenJnlLine(GenJnlLine: Record "Gen. Journal Line"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry"; var Handled: Boolean)
this event is raised before creating the GLAccrualEntry record and allows you to prevent the creation of accruals for that registration
Parameters / Return Value
GenJnlLine
Record "Gen. Journal Line"
Current Journal line
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
Custom Accrual Entry
Handled
Boolean
Return true to skip standard Accrual creation
OnBeforeCreateGLAccrualEntry_Sales
local procedure OnBeforeCreateGLAccrualEntry_Sales(SalesHeader: Record "Sales Header"; SalesLine: Record "Sales Line"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry"; var Handled: Boolean)
this event is raised before creating the GLAccrualEntry record and allows you to prevent the creation of accruals for that registration
Parameters / Return Value
SalesHeader
Record "Sales Header"
Current Sales Header
SalesLine
Record "Sales Line"
Current Sales Line
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
Custom Accrual Entry
Handled
Boolean
Return true to skip standard Accrual creation
OnBeforeCreateGLAccrualEntry_Purchase
local procedure OnBeforeCreateGLAccrualEntry_Purchase(PurchHeader: Record "Purchase Header"; PurchLine: Record "Purchase Line"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry"; var Handled: Boolean)
this event is raised before creating the GLAccrualEntry record and allows you to prevent the creation of accruals for that registration
Parameters / Return Value
PurchHeader
Record "Purchase Header"
Current Purchase Header
PurchLine
Record "Purchase Line"
Current Purchase Line
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
Custom Accrual Entry
Handled
Boolean
Return true to skip standard Accrual creation
OnAfterCopyParametersToGLAcrrualsEntryInCalcGLAccrualFromGLEntry
local procedure OnAfterCopyParametersToGLAcrrualsEntryInCalcGLAccrualFromGLEntry(GlEntry: Record "G/L Entry"; AccrualsParameters: Record "EOS G/L Accrual Entry"; var TmpGlAccrEntry: Record "EOS G/L Accrual Entry")
Raised after copying initializing GL Accruals fields from AccrualsParameters, before calculating the Amount LCY
Parameters / Return Value
GlEntry
Record "G/L Entry"
current GL Entry
AccrualsParameters
Record "EOS G/L Accrual Entry"
GL Accruals Entry parameters used for initialising
TmpGlAccrEntry
Record "EOS G/L Accrual Entry"
Temp GL Accruals Entry that will be used to calculate the accruals
OnBeforeTestPeriodOpen
local procedure OnBeforeTestPeriodOpen(GLAccrualEntry: Record "EOS G/L Accrual Entry"; TmpGenJnlLine: Record "Gen. Journal Line"; PeriodDate: Date; var IsHandled: Boolean)
Raised before checking if an Accounting Period is open or not. An error is raised if the period is closed.
Parameters / Return Value
GLAccrualEntry
Record "EOS G/L Accrual Entry"
Original G/L Accrual Entry
TmpGenJnlLine
Record "Gen. Journal Line"
General Journal Line that is being inserted
PeriodDate
Date
Date used to find the accounting period
IsHandled
Boolean
If true, the period will not be checked
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.