Codeunit 5616 "Depreciation Calculation"
Base Application · Microsoft.FixedAssets.Depreciation
Across versions
- BC23present
- BC241 events added
- BC251 events added, 1 events removed
- BC26unchanged
- BC275 procedures added
- BC281 procedures added
- BC29-30unchanged
Neighbourhood 22 connected objects and pages
Base Application · Microsoft.FixedAssets.Depreciation · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Permissions | TableData “FA Ledger Entry” = r, TableData “FA Posting Type Setup” = r, TableData “Maintenance Ledger Entry” = r |
Events published
OnAfterAdjustDepr(DeprBookCode: Code[10]; BookValue: Decimal; MaxValue: Decimal; var Depreciation: Decimal)(integration)OnAfterCalcDepreciation(DeprBookCode: Code[10]; var Depreciation: Decimal; BookValue: Decimal)(integration)OnAfterDeprDays(StartingDate: Date; EndingDate: Date; var NumberOfDeprDays: Integer; Year365Days: Boolean)(integration)OnAfterGetDeprPeriod(FANo: Code[20]; DeprBookCode: Code[10]; UntilDate: Date; var StartingDate: Date; var EndingDate: Date; var NumberOfDays: Integer; Year365Days: Boolean)(integration)OnBeforeCalcRounding(DeprBook: Record "Depreciation Book"; OrigDeprAmount: Decimal; var DeprAmount: Decimal; var IsHandled: Boolean)+ BC25 − BC25 (integration)OnBeforeFindMaxDate(var FALedgEntry: Record "FA Ledger Entry"; EntryDates: array[4] of Date; Year365Days: Boolean; var MaxDate: Date; var IsHandled: Boolean)(integration)OnBeforeGetFirstDeprDate(FixedAssetNo: Code[20]; DepreciationBookCode: Code[10]; Year365Days: Boolean; var LocalDate: Date; var IsHandled: Boolean)(integration)OnBeforeUseDeprStartingDate(FANo: Code[20]; DeprBookCode: Code[10]; var Result: Boolean; var IsHandled: Boolean)(integration)OnAfterGetFAPostingTypeSetup(var FAPostingTypeSetup: Record "FA Posting Type Setup"; Type: Option IncludeInDeprCalc,IncludeInGainLoss,DepreciationType,ReverseType)(integration)OnCalcEntryAmountsOnAfterSetFALedgEntryFilters(var FALedgerEntry: Record "FA Ledger Entry"; I: Integer)(integration)OnGetFirstDeprDateOnAfterSetFAFilter(var FALedgerEntry: Record "FA Ledger Entry")+ BC24 (integration)OnAfterSetFAFilter(var FALedgerEntry: Record "FA Ledger Entry")(integration)
Procedures
DeprDays(StartingDate: Date; EndingDate: Date; Year365Days: Boolean): Integer+ BC27DeprDays(StartingDate: Date; EndingDate: Date; Year365Days: Boolean; UseAccountingPeriod: Boolean): Integer+ BC27ToMorrow(ThisDate: Date; Year365Days: Boolean): Date+ BC27ToMorrow(ThisDate: Date; Year365Days: Boolean; UseAccountingPeriod: Boolean): Date+ BC27Yesterday(ThisDate: Date; Year365Days: Boolean): Date+ BC27Yesterday(ThisDate: Date; Year365Days: Boolean; UseAccountingPeriod: Boolean): Date+ BC27SetFAFilter(var FALedgEntry: Record "FA Ledger Entry"; FANo: Code[20]; DeprBookCode: Code[10]; FAPostingTypeOrder: Boolean)CalcEntryAmounts(FANo: Code[20]; DeprBookCode: Code[10]; StartingDate: Date; EndingDate: Date; var EntryAmounts: array[4] of Decimal)UseDeprStartingDate(FANo: Code[20]; DeprBookCode: Code[10]): BooleanGetFirstDeprDate(FANo: Code[20]; DeprBookCode: Code[10]; Year365Days: Boolean): Date+ BC27GetFirstDeprDate(FANo: Code[20]; DeprBookCode: Code[10]; Year365Days: Boolean; UseAccountingPeriod: Boolean): Date+ BC27GetMinusBookValue(FANo: Code[20]; DeprBookCode: Code[10]; StartingDate: Date; EndingDate: Date): DecimalGetUnpostedBonusDepreciationForCalc(var FADepreciationBook: Record "FA Depreciation Book"; StartingDate: Date; EndingDate: Date): Decimal+ BC28 (internal)AdjustDepr(DeprBookCode: Code[10]; var Depreciation: Decimal; BookValue: Decimal; SalvageValue: Decimal; EndingBookValue: Decimal; FinalRoundingAmount: Decimal)AdjustCustom1(DeprBookCode: Code[10]; var DeprAmount: Decimal; var Custom1Amount: Decimal; BookValue: Decimal; SalvageValue: Decimal; EndingBookValue: Decimal; FinalRoundingAmount: Decimal)GetSign(BookValue: Decimal; DeprBasis: Decimal; SalvageValue: Decimal; MinusBookValue: Decimal): IntegerGetCustom1Sign(BookValue: Decimal; AcquisitionCost: Decimal; Custom1: Decimal; SalvageValue: Decimal; MinusBookValue: Decimal): IntegerGetNewSigns(var BookValue: Decimal; var DeprBasis: Decimal; var SalvageValue: Decimal; var MinusBookValue: Decimal)GetNewCustom1Signs(var BookValue: Decimal; var AcquisitionCost: Decimal; var Custom1: Decimal; var SalvageValue: Decimal; var MinusBookValue: Decimal)CalcRounding(DeprBookCode: Code[10]; DeprAmount: Decimal): DecimalCalculateDeprInPeriod(FANo: Code[20]; DeprBookCode: Code[10]; EndingDate: Date; CalculatedDepr: Decimal; Sign: Integer; var NewBookValue: Decimal; var DeprBasis: Decimal; var SalvageValue: Decimal; var MinusBookValue: Decimal)GetDeprPeriod(FANo: Code[20]; DeprBookCode: Code[10]; UntilDate: Date; var StartingDate: Date; var EndingDate: Date; var NumberOfDays: Integer; Year365Days: Boolean)+ BC27GetDeprPeriod(FANo: Code[20]; DeprBookCode: Code[10]; UntilDate: Date; var StartingDate: Date; var EndingDate: Date; var NumberOfDays: Integer; Year365Days: Boolean; UseAccountingPeriod: Boolean)+ BC27DeprInFiscalYear(FANo: Code[20]; DeprBookCode: Code[10]; StartingDate: Date): DecimalGetPartOfCalculation(Type: Option IncludeInDeprCalc,IncludeInGainLoss,DepreciationType,ReverseType; PostingType: Option "Write-Down",Appreciation,"Custom 1","Custom 2"; DeprBookCode: Code[10]): BooleanFAName(var FA: Record "Fixed Asset"; DeprBookCode: Code[10]): Text[200]FADeprBookName(DeprBookCode: Code[10]): Text[200]DeprDays365(StartingDate: Date; EndingDate: Date): Integer
Plus 8 local procedures.
Triggers
OnRun
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 5617 “FA Date Calculation” (1 call:
DeprInFiscalYear → GetFiscalYear)
Called by
- Codeunit 5611 “Calculate Normal Depreciation” (23 calls:
CalcDB1Amount → DeprInFiscalYear,CalcHalfYearConventionDepr → DeprDays,CalcHalfYearConventionDepr → Yesterday, …) - Codeunit 5612 “Calculate Custom 1 Depr.” (14 calls:
CalcDB1Amount → DeprInFiscalYear,CalcSLAmount → DeprDays,CalcSLAmount → Yesterday, …) - Report 5607 “Fixed Asset - Projected Value” (7 calls:
CalculateFirstDeprAmount → DeprInFiscalYear,GetNextDate → ToMorrow,GetPeriodEndingDate → DeprDays, …) - Codeunit 5605 “Calculate Disposal” (5 calls:
CalcGainLoss → CalcEntryAmounts,CalcGainLoss → GetPartOfCalculation,CalcReverseAmounts → CalcEntryAmounts, …) - Codeunit 5601 “FA Insert G/L Account” (3 calls:
CalcLastDisposal → SetFAFilter,CorrectBookValueEntry → SetFAFilter,InsertBufferBalAcc → CalcRounding) - Codeunit 5606 “FA Check Consistency” (3 calls:
CreateDisposedError → FAName,FADeprBookName → FADeprBookName,FAName → FAName) - Codeunit 5618 “Table Depr. Calculation” (3 calls:
CreateTableBuffer → DeprDays,CreateTableBuffer → Yesterday,GetTablePercent → DeprDays) - Codeunit 5642 “FA Reclass. Transfer Line” (3 calls:
FAName → FAName,InsertFAJnlLine → CalcRounding,InsertGenJnlLine → CalcRounding) - Table 5612 “FA Depreciation Book” (3 calls:
CalcDeprPeriod → DeprDays,CalcEndingDate → Yesterday,ShowBookValueAfterDisposal → SetFAFilter) - Codeunit 5613 “Calculate Acq. Cost Depr.” (2 calls:
CreateError → FAName,DeprCalc → CalcRounding) - Codeunit 5600 “FA Insert Ledger Entry” (1 call:
FAName → FAName) - Codeunit 5610 “Calculate Depreciation” (1 call:
CheckDeprDaysInFiscalYear → DeprDays) - Codeunit 5626 “FA General Report” (1 call:
GetLastDate → SetFAFilter) - Codeunit 5631 “FA Jnl.-Check Line” (1 call:
CheckFADepAcrossFiscalYear → ToMorrow) - Codeunit 5632 “FA Jnl.-Post Line” (1 call:
FAName → FAName) - Codeunit 5634 “FA Jnl.-Show Entries” (1 call:
OnRun → SetFAFilter) - Codeunit 6283 “Sust. FA Journal Subscriber” (1 call:
FAName → FAName) - Page 5666 “FA Depreciation Books Subform” (1 call:
ShowFALedgEntries → SetFAFilter) - Report 5611 “FA Posting Group - Net Change” (1 call:
CalcNetDisposalMethod → SetFAFilter) - Table 179 “Reversal Entry” (1 call:
CheckFA → FAName) - Table 5640 “Main Asset Component” (1 call:
CreateError → FAName)
Recent changes
- 2026-07-24 #9662 [Master]-Fixed Asset: Declining-Balance method - wrong calculation when running depreciation (main, BC30, fix)
Countries that replace it
Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Depreciation Calculation"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.