{"title":"Codeunit 5836 Cost Calculation Management, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5836-cost-calculation-management/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-05","object":{"type":"codeunit","id":5836,"name":"Cost Calculation Management","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5836-cost-calculation-management/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5836-cost-calculation-management/source/","path":"src/Layers/W1/BaseApp/Inventory/Costing/CostCalculationManagement.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":{"table:32":{"name":"Item Ledger Entry","url":"https://jonas-paprotka.de/ref/table/32-item-ledger-entry/"},"codeunit:5402":{"name":"Unit of Measure Management","url":"https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/"},"table:111":{"name":"Sales Shipment Line","url":"https://jonas-paprotka.de/ref/table/111-sales-shipment-line/"},"table:6661":{"name":"Return Receipt Line","url":"https://jonas-paprotka.de/ref/table/6661-return-receipt-line/"},"table:113":{"name":"Sales Invoice Line","url":"https://jonas-paprotka.de/ref/table/113-sales-invoice-line/"},"table:115":{"name":"Sales Cr.Memo Line","url":"https://jonas-paprotka.de/ref/table/115-sales-cr-memo-line/"}},"procs":[{"name":"SplitItemLedgerEntriesExist","line":81,"kind":"procedure","params":3,"steps":[[89,"write",32,"DeleteAll"],[92,"call","IsSameDocLineItemLedgEntry",3],[95,"write",32,"Insert"],[97,"write",32,"Insert"]]},{"name":"CalcSalesLineCostLCY","line":121,"kind":"procedure","params":2,"steps":[[128,"event","OnBeforeCalcSalesLineCostLCY",1],[136,"call","CalcSalesLineShptAdjCostLCY",5],[141,"call","CalcSalesLineRcptAdjCostLCY",5]]},{"name":"CalcSalesLineShptAdjCostLCY","line":145,"kind":"procedure","params":5,"steps":[[161,"event","OnCalcSalesLineShptAdjCostLCYBeforeSalesShptLineFind",0],[174,"ext","codeunit",5402,"QtyRndPrecision",0],[176,"call","CalcSalesShptLineCostLCY",2]]},{"name":"CalcSalesLineRcptAdjCostLCY","line":205,"kind":"procedure","params":5,"steps":[[234,"ext","codeunit",5402,"QtyRndPrecision",0],[236,"call","CalcReturnRcptLineCostLCY",2]]},{"name":"CalcSalesShptLineCostLCY","line":265,"kind":"procedure","access":"local","params":2,"steps":[[275,"ext","table",111,"FilterPstdDocLnItemLedgEntries",1],[278,"call","CalcPostedDocLineCostLCY",2],[281,"event","OnBeforeRelatedReturnReceiptExists",1],[285,"call","RelatedReturnReceiptExist",2],[287,"call","CalcReturnRcptLineCostLCY",2]]},{"name":"RelatedReturnReceiptExist","line":296,"kind":"procedure","access":"local","params":2,"steps":[[304,"event","OnBeforeSetFiltersRelatedReturnReceiptExists",1]]},{"name":"CalcReturnRcptLineCostLCY","line":313,"kind":"procedure","access":"local","params":2,"steps":[[321,"ext","table",6661,"FilterPstdDocLnItemLedgEntries",1],[324,"call","CalcPostedDocLineCostLCY",2]]},{"name":"CalcSalesInvLineCostLCY","line":351,"kind":"procedure","params":1,"steps":[[359,"ext","table",113,"FilterPstdDocLineValueEntries",1],[360,"call","SumValueEntriesCostAmt",1]]},{"name":"CalcSalesCrMemoLineCostLCY","line":376,"kind":"procedure","params":1,"steps":[[384,"ext","table",115,"FilterPstdDocLineValueEntries",1],[385,"call","SumValueEntriesCostAmt",1]]},{"name":"CalcCustLedgAdjmtCostLCY","line":402,"kind":"procedure","params":1,"steps":[[422,"call","SumValueEntriesCostAmt",1]]},{"name":"CalcCustLedgActualCostLCY","line":441,"kind":"procedure","params":1,"steps":[[461,"call","SumValueEntriesCostAmt",1]]},{"name":"CalcCustActualCostLCY","line":464,"kind":"procedure","params":1,"steps":[[475,"event","OnCalcCustActualCostLCYOnAfterFilterValueEntry",0],[485,"event","OnCalcCustActualCostLCYOnAfterFilterResLedgerEntry",0]]},{"name":"CanIncNonInvCostIntoProductionItem","line":558,"kind":"procedure","params":0,"steps":[[560,"event","OnCanIncNonInvCostIntoProductionItem",0]]}]}