---
title: "Codeunit 5616 Depreciation Calculation, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/points/
object: https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/
checked: 2026-11-20
changed: 2026-10-21
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 5616 Depreciation Calculation, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/points/

20 procedures and triggers with a step in src/Layers/W1/BaseApp/FixedAssets/Depreciation/DepreciationCalculation.Codeunit.al, in source order, read from the text, not from a run.

## DeprDays

[Line 36](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L36).

- [51](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L51) calls `DeprDays365`
- [66](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L66) raises `OnAfterDeprDays`

## ToMorrow

[Line 74](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L74).

- [77](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L77) calls `ToMorrow365`

## Yesterday

[Line 89](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L89).

- [92](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L92) calls `Yesterday365`

## SetFAFilter

[Line 101](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L101).

- [115](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L115) raises `OnAfterSetFAFilter`

## CalcEntryAmounts

[Line 118](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L118).

- [125](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L125) calls `SetFAFilter`
- [139](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L139) raises `OnCalcEntryAmountsOnAfterSetFALedgEntryFilters`

## GetLastEntryDates

[Line 145](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L145), local.

- [151](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L151) calls `SetFAFilter`
- [163](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L163) calls `GetPartOfCalculation`
- [168](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L168) calls `CheckEntryDate`

## UseDeprStartingDate

[Line 173](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L173).

- [181](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L181) raises `OnBeforeUseDeprStartingDate`, IsHandled
- [185](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L185) calls `SetFAFilter`
- [190](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L190) calls `GetLastEntryDates`

## GetFirstDeprDate

[Line 202](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L202).

- [210](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L210) raises `OnBeforeGetFirstDeprDate`, IsHandled
- [214](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L214) calls `SetFAFilter`
- [215](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L215) raises `OnGetFirstDeprDateOnAfterSetFAFilter`
- [226](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L226) calls `ToMorrow`
- [227](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L227) calls `ToMorrow`
- [228](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L228) calls `GetLastEntryDates`
- [229](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L229) calls `FindMaxDate`

## FindMaxDate

[Line 233](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L233), local.

- [239](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L239) raises `OnBeforeFindMaxDate`, IsHandled

## GetMinusBookValue

[Line 248](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L248).

- [254](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L254) calls `CalcEntryAmounts`
- [256](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L256) calls `GetPartOfCalculation`

## GetUnpostedBonusDepreciationForCalc

[Line 261](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L261), internal.

- [272](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L272) calls [Table 5612 FA Depreciation Book](https://jonas-paprotka.de/ref/table/5612-fa-depreciation-book/) `EligibleForBonusDepreciation`
- [275](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L275) calls [Table 5612 FA Depreciation Book](https://jonas-paprotka.de/ref/table/5612-fa-depreciation-book/) `BonusDepreciationApplied`
- [278](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L278) calls [Table 5612 FA Depreciation Book](https://jonas-paprotka.de/ref/table/5612-fa-depreciation-book/) `BonusDepreciationAmount`

## AdjustDepr

[Line 293](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L293).

- [302](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L302) calls `CalcRounding`
- [303](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L303) raises `OnAfterCalcDepreciation`
- [316](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L316) raises `OnAfterAdjustDepr`

## AdjustCustom1

[Line 319](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L319).

- [329](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L329) calls `CalcRounding`
- [330](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L330) calls `CalcRounding`
- [338](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L338) calls `CalcMaxDepr`
- [344](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L344) calls `AdjustDepr`
- [349](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L349) calls `CalcMaxDepr`
- [353](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L353) calls `AdjustDepr`

## CalcRounding

[Line 406](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L406).

- [414](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L414) raises `OnBeforeCalcRounding`, IsHandled

## CalculateDeprInPeriod

[Line 424](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L424).

- [450](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L450) calls `GetMinusBookValue`
- [450](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L450) calls `GetUnpostedBonusDepreciationForCalc`

## GetDeprPeriod

[Line 458](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L458).

- [467](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L467) calls `SetFAFilter`
- [470](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L470) calls `ToMorrow`
- [476](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L476) calls `ToMorrow`
- [479](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L479) calls `SetFAFilter`
- [491](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L491) calls `GetPartOfDeprCalculation`
- [493](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L493) calls `Yesterday`
- [500](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L500) calls `DeprDays`
- [502](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L502) raises `OnAfterGetDeprPeriod`

## DeprInFiscalYear

[Line 505](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L505).

- [515](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L515) calls [Codeunit 5617 FA Date Calculation](https://jonas-paprotka.de/ref/codeunit/5617-fa-date-calculation/) `GetFiscalYear`
- [520](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L520) calls `SetFAFilter`
- [527](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L527) calls `CalcEntryAmounts`
- [529](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L529) calls `GetPartOfCalculation`

## GetPartOfCalculation

[Line 534](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L534).

- [548](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L548) raises `OnAfterGetFAPostingTypeSetup`

## GetPartOfDeprCalculation

[Line 560](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L560), local.

- [577](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L577) calls `GetPartOfCalculation`

## CheckEntryDate

[Line 647](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L647), local.

- [649](https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/source/#L649) calls `IsDepreciationTypeEntry`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
