{"title":"Codeunit 5611 Calculate Normal Depreciation, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5611-calculate-normal-depreciation/points/","author":"JOP-AL","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/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-21","object":{"type":"codeunit","id":5611,"name":"Calculate Normal Depreciation","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5611-calculate-normal-depreciation/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5611-calculate-normal-depreciation/source/","path":"src/Layers/W1/BaseApp/FixedAssets/Depreciation/CalculateNormalDepreciation.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:5616":{"name":"Depreciation Calculation","url":"https://jonas-paprotka.de/ref/codeunit/5616-depreciation-calculation/"},"table:5612":{"name":"FA Depreciation Book","url":"https://jonas-paprotka.de/ref/table/5612-fa-depreciation-book/"},"codeunit:5617":{"name":"FA Date Calculation","url":"https://jonas-paprotka.de/ref/codeunit/5617-fa-date-calculation/"},"codeunit:5618":{"name":"Table Depr. Calculation","url":"https://jonas-paprotka.de/ref/codeunit/5618-table-depr-calculation/"}},"procs":[{"name":"Calculate","line":87,"kind":"procedure","params":8,"steps":[[97,"event","OnBeforeCalculate",1],[109,"event","OnAfterGetDeprBooks",0],[124,"event","OnBeforeCalcTransferValueSetVariables",0],[126,"call","AssignVariablesToStorage",10],[128,"event","OnCalculateOnBeforeTransferValue",1],[130,"call","AssignStorageToVariables",10],[132,"call","TransferValues",0],[134,"call","SkipRecord",0],[141,"ext","codeunit",5616,"GetSign",4],[145,"ext","codeunit",5616,"GetNewSigns",4],[153,"event","OnCalculateOnBeforeAssignSkipOnZeroValue",1],[167,"event","OnAfterSkipOnZeroValue",1],[172,"call","CalculateDeprAmount",0],[175,"event","OnAfterCalcFinalDeprAmount",1]]},{"name":"SkipRecord","line":185,"kind":"procedure","access":"local","params":0,"steps":[[191,"event","OnBeforeSkipRecord",1]]},{"name":"ProcessDaysInPeriod","line":217,"kind":"procedure","access":"local","params":0,"steps":[[223,"event","OnAfterProcessDaysInPeriod",0]]},{"name":"CalculateDeprAmount","line":226,"kind":"procedure","access":"local","params":0,"steps":[[234,"ext","codeunit",5616,"GetFirstDeprDate",4],[237,"ext","codeunit",5616,"UseDeprStartingDate",2],[245,"event","OnBeforeNumberofDayCalculateNumberofDays",1],[247,"ext","codeunit",5616,"DeprDays",4],[252,"call","ProcessDaysInPeriod",0],[253,"call","SetHalfYearConventionMethod",0],[255,"event","UpdateDaysInFiscalYear",1],[264,"call","CalcHalfYearConventionDepr",0],[268,"call","CalcSLAmount",0],[270,"call","CalcDB1Amount",0],[272,"call","CalcDB2Amount",0],[275,"call","CalcDBSLAmount",0],[279,"call","CalcUserDefinedAmount",1],[281,"ext","codeunit",5616,"CalcRounding",2],[281,"call","CalcBelowZeroAmount",0],[286,"event","OnCalculateDeprAmountOnDeprMethodCaseLastEntry",0],[289,"event","OnCalculateDeprAmountOnAfterAssignAmountLastEntry",0],[299,"ext","codeunit",5616,"GetDeprPeriod",8],[302,"ext","codeunit",5616,"DeprDays",4],[304,"ext","codeunit",5616,"CalculateDeprInPeriod",9],[307,"ext","codeunit",5616,"GetSign",4],[313,"call","CalcSLAmount",0],[315,"call","CalcDB1Amount",0],[317,"call","CalcDB2Amount",0],[321,"call","CalcUserDefinedAmount",1],[326,"event","OnCalculateDeprAmountOnDeprMethodCaseLastDeprEntry",0],[329,"ext","codeunit",5616,"GetDeprPeriod",8],[336,"event","OnAfterCalculateFinalAmount",1],[342,"event","OnCalculateDeprAmountOnBeforeCalculateDeprAmount",1],[348,"ext","codeunit",5616,"AdjustDepr",6],[352,"event","OnAfterCalculateDeprAmount",0]]},{"name":"CalcTempDeprAmount","line":358,"kind":"procedure","access":"local","params":1,"steps":[[368,"call","GetFAName",0],[374,"call","GetFAName",0],[380,"call","GetFAName",0],[387,"call","GetFAName",0],[393,"call","GetFAName",0]]},{"name":"StraightLineBonusBaseReduction","line":402,"kind":"procedure","access":"local","params":0,"steps":[[407,"call","CalcStraightLineBonusBaseReduction",0]]},{"name":"CalcStraightLineBonusBaseReduction","line":413,"kind":"procedure","access":"local","params":0,"steps":[[420,"ext","table",5612,"BonusDepreciationApplied",0],[423,"ext","codeunit",5616,"GetMinusBookValue",4],[426,"ext","codeunit",5616,"GetMinusBookValue",4],[426,"ext","codeunit",5616,"GetUnpostedBonusDepreciationForCalc",3]]},{"name":"CalcSLAmount","line":429,"kind":"procedure","access":"local","params":0,"steps":[[435,"call","CalcTempDeprAmount",1],[439,"call","StraightLineBonusBaseReduction",0],[440,"event","OnCalcSLAmountOnAfterCalcFromSLPercent",0],[445,"event","OnCalcSLAmountOnBeforeCheckFixedAmount",1],[455,"ext","codeunit",5616,"DeprDays",4],[455,"ext","codeunit",5616,"Yesterday",3],[461,"ext","codeunit",5616,"DeprDays",4],[462,"ext","codeunit",5616,"Yesterday",3],[466,"event","OnCalcSLAmountOnAfterCalcResultForRemainingLifeExpired",0],[471,"event","OnAfterCalcSL",1]]},{"name":"CalcDB1Amount","line":480,"kind":"procedure","params":0,"steps":[[484,"call","CalcTempDeprAmount",1],[488,"ext","codeunit",5616,"DeprInFiscalYear",3],[497,"event","OnAfterCalcDB1Amount",0]]},{"name":"CalcDB2Amount","line":500,"kind":"procedure","access":"local","params":0,"steps":[[502,"call","CalcTempDeprAmount",1]]},{"name":"CalcDBSLAmount","line":510,"kind":"procedure","access":"local","params":0,"steps":[[517,"call","CalcDB1Amount",0],[519,"call","CalcDB2Amount",0],[521,"ext","codeunit",5617,"GetFiscalYear",2],[522,"ext","codeunit",5617,"GetFiscalYear",2],[525,"call","CalcSLAmount",0],[529,"event","OnAfterCalcDBSLAmount",0]]},{"name":"CalcUserDefinedAmount","line":533,"kind":"procedure","access":"local","params":1,"steps":[[537,"call","CalcTempDeprAmount",1],[541,"ext","codeunit",5618,"GetTablePercent",5]]},{"name":"CalcBelowZeroAmount","line":546,"kind":"procedure","access":"local","params":0,"steps":[[548,"call","CalcTempDeprAmount",1]]},{"name":"TransferValues","line":558,"kind":"procedure","access":"local","params":0,"steps":[[573,"call","GetFAName",0],[581,"call","GetFAName",0],[589,"call","SetDeprMethod",1],[590,"event","OnTransferValuesOnAfterSetDeprMethod",0],[607,"ext","codeunit",5616,"GetMinusBookValue",4],[607,"ext","codeunit",5616,"GetUnpostedBonusDepreciationForCalc",3],[612,"event","OnAfterBookValueRecalculateBookValue",0],[624,"call","GetFAName",0],[629,"event","OnAfterBookValueCheckAddedDeprApplicable",0],[636,"call","GetFAName",0],[638,"ext","codeunit",5616,"DeprDays",4],[658,"event","OnAfterDaysinFYRecalculateDaysInFiscalYear",1],[665,"ext","codeunit",5616,"DeprDays",4],[669,"event","OnAfterTransferValues2",0]]},{"name":"GetFAName","line":672,"kind":"procedure","access":"local","params":0,"steps":[[674,"ext","codeunit",5616,"FAName",2]]},{"name":"SetHalfYearConventionMethod","line":677,"kind":"procedure","access":"local","params":0,"steps":[[685,"event","OnBeforeSetHalfYearConventionMethod",1],[701,"ext","codeunit",5616,"ToMorrow",3],[721,"call","GetFAName",0]]},{"name":"CalcHalfYearConventionDepr","line":725,"kind":"procedure","access":"local","params":0,"steps":[[734,"call","CalcTempDeprAmount",1],[737,"call","CalcHalfYearPercent",0],[741,"ext","codeunit",5616,"DeprDays",4],[743,"ext","codeunit",5616,"Yesterday",3],[753,"ext","codeunit",5616,"DeprDays",3],[754,"ext","codeunit",5616,"Yesterday",3],[760,"event","OnCalcHalfYearConventionDeprOnAfterFirstCalcDeprAmount",0],[765,"ext","codeunit",5616,"DeprDays",4],[770,"call","CalcSLAmount",0],[772,"call","CalcDB1Amount",0],[774,"call","CalcDBSLAmount",0]]},{"name":"CalcHalfYearPercent","line":786,"kind":"procedure","access":"local","params":0,"steps":[[791,"event","OnBeforeCalcHalfYearPercent",1],[804,"ext","codeunit",5616,"DeprDays",4]]}]}