{"title":"Codeunit 7003 Price Calculation - V15, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/7003-price-calculation-v15/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":7003,"name":"Price Calculation - V15","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/7003-price-calculation-v15/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/7003-price-calculation-v15/source/","path":"src/Layers/W1/BaseApp/Pricing/Calculation/PriceCalculationV15.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:7006":{"name":"Price Calculation Setup","url":"https://jonas-paprotka.de/ref/table/7006-price-calculation-setup/"},"codeunit:7000":{"name":"Sales Price Calc. Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/7000-sales-price-calc-mgt/"},"codeunit:7010":{"name":"Purch. Price Calc. Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/7010-purch-price-calc-mgt/"},"codeunit:7008":{"name":"Price Calculation Buffer Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/7008-price-calculation-buffer-mgt/"},"codeunit:7009":{"name":"CopyFromToPriceListLine","url":"https://jonas-paprotka.de/ref/codeunit/7009-copyfromtopricelistline/"},"page:7007":{"name":"Get Sales Price","url":"https://jonas-paprotka.de/ref/page/7007-get-sales-price/"},"codeunit:1004":{"name":"Job Transfer Line","url":"https://jonas-paprotka.de/ref/codeunit/1004-job-transfer-line/"},"codeunit:220":{"name":"Resource-Find Cost","url":"https://jonas-paprotka.de/ref/codeunit/220-resource-find-cost/"}},"procs":[{"name":"OnRun","line":23,"kind":"trigger","steps":[[28,"write",7006,"DeleteAll"],[29,"call","AddSupportedSetup",1],[30,"write",7006,"ModifyAll"]]},{"name":"ApplyDiscount","line":53,"kind":"procedure","params":0,"steps":[[59,"call","ApplyDiscountSalesHandler",0],[61,"call","ApplyDiscountPurchHandler",0]]},{"name":"ApplyPrice","line":65,"kind":"procedure","params":1,"steps":[[71,"call","ApplyPriceSalesHandler",1],[73,"call","ApplyPricePurchHandler",1]]},{"name":"CountDiscount","line":77,"kind":"procedure","params":1,"steps":[[87,"ext","codeunit",7000,"NoOfSalesLineLineDisc",3],[89,"ext","codeunit",7010,"NoOfPurchLineLineDisc",3],[91,"event","OnCountDiscount",0]]},{"name":"CountPrice","line":95,"kind":"procedure","params":1,"steps":[[105,"ext","codeunit",7000,"NoOfSalesLinePrice",3],[107,"ext","codeunit",7010,"NoOfPurchLinePrice",3],[109,"event","OnCountPrice",0]]},{"name":"FindDiscount","line":113,"kind":"procedure","params":2,"steps":[[122,"call","IsDisabled",0],[126,"ext","codeunit",7008,"GetBuffer",1],[127,"ext","codeunit",7000,"FindSalesLineDisc"],[129,"ext","codeunit",7008,"GetSource",1],[130,"ext","codeunit",7008,"GetSource",1],[131,"ext","codeunit",7008,"GetSource",1],[132,"ext","codeunit",7008,"GetSource",1],[141,"ext","codeunit",7009,"CopyFrom",2],[144,"ext","codeunit",7008,"FillBestLine",2]]},{"name":"FindPrice","line":147,"kind":"procedure","params":2,"steps":[[156,"call","IsDisabled",0],[160,"ext","codeunit",7008,"GetBuffer",1],[161,"ext","codeunit",7000,"FindSalesPrice"],[163,"ext","codeunit",7008,"GetSource",1],[164,"ext","codeunit",7008,"GetSource",1],[165,"ext","codeunit",7008,"GetSource",1],[166,"ext","codeunit",7008,"GetSource",1],[174,"ext","codeunit",7009,"CopyFrom",2],[177,"ext","codeunit",7008,"FillBestLine",2]]},{"name":"IsDiscountExists","line":180,"kind":"procedure","params":1,"steps":[[190,"ext","codeunit",7000,"SalesLineLineDiscExists",3],[192,"ext","codeunit",7010,"PurchLineLineDiscExists",3],[194,"event","OnIsDiscountExists",0]]},{"name":"IsPriceExists","line":198,"kind":"procedure","params":1,"steps":[[208,"ext","codeunit",7000,"SalesLinePriceExists",3],[210,"ext","codeunit",7010,"PurchLinePriceExists",3],[212,"event","OnIsPriceExists",0]]},{"name":"PickDiscount","line":216,"kind":"procedure","params":0,"steps":[[228,"ext","codeunit",7000,"GetSalesLineLineDisc",2],[233,"ext","codeunit",7010,"GetPurchLineLineDisc",2],[237,"event","OnPickDiscount",0]]},{"name":"PickPrice","line":242,"kind":"procedure","params":0,"steps":[[252,"ext","codeunit",7000,"GetSalesLinePrice",2],[254,"ext","codeunit",7010,"GetPurchLinePrice",2],[256,"event","OnPickPrice",0]]},{"name":"ShowPrices","line":261,"kind":"procedure","params":1,"steps":[[266,"ext","codeunit",7009,"CopyTo",2],[268,"run","page",7007]]},{"name":"IsDisabled","line":271,"kind":"procedure","access":"local","params":0,"steps":[[273,"event","OnIsDisabled",0]]},{"name":"OnFindImplementationHandler","line":282,"kind":"procedure","access":"local","params":1,"steps":[[284,"call","AddSupportedSetup",1]]},{"name":"AddSupportedSetup","line":287,"kind":"procedure","access":"local","params":1,"steps":[[290,"validate",7006,"Implementation"],[292,"call","IsDisabled",0],[294,"write",7006,"Insert",1],[296,"write",7006,"Insert",1]]},{"name":"ApplyPriceSalesHandler","line":299,"kind":"procedure","access":"local","params":1,"steps":[[312,"call","IsDisabled",0],[321,"ext","codeunit",7000,"FindItemJnlLinePrice",2],[328,"ext","codeunit",7000,"FindJobJnlLinePrice",2],[334,"ext","codeunit",1004,"JobTransferMarkerFieldNo",0],[335,"ext","codeunit",7000,"JobPlanningLineFindJTPrice",1],[337,"ext","codeunit",7000,"FindJobPlanningLinePrice",2],[343,"ext","codeunit",7000,"FindResPrice",1],[349,"ext","codeunit",7000,"FindSalesLinePrice",3],[356,"ext","codeunit",7000,"FindStdItemJnlLinePrice",2],[362,"event","OnAfterApplyPriceSalesHandler",0]]},{"name":"ApplyDiscountSalesHandler","line":365,"kind":"procedure","access":"local","params":0,"steps":[[374,"event","OnBeforeApplyDiscountSalesHandler",1],[378,"call","IsDisabled",0],[386,"ext","codeunit",7000,"FindSalesLineLineDisc",2],[391,"event","OnAfterApplyDiscountSalesHandler",0]]},{"name":"ApplyPricePurchHandler","line":394,"kind":"procedure","access":"local","params":1,"steps":[[419,"ext","codeunit",7010,"FindItemJnlLinePrice",2],[426,"ext","codeunit",7010,"FindJobJnlLinePrice",2],[432,"ext","codeunit",7010,"FindJobPlanningLinePrice",2],[438,"ext","codeunit",7010,"FindPurchLinePrice",3],[444,"call","FindPriceListLine",1],[450,"ext","codeunit",7010,"FindResUnitCost",1],[456,"ext","codeunit",7010,"FindReqLinePrice",2],[464,"ext","codeunit",7010,"FindResUnitCost",1],[474,"ext","codeunit",7010,"FindStdItemJnlLinePrice",2],[480,"event","OnAfterApplyPricePurchHandler",0]]},{"name":"FindPriceListLine","line":483,"kind":"procedure","access":"local","params":1,"steps":[[495,"event","OnFindPriceListLineOnBeforeRunResourceFindCost",0],[496,"run","codeunit",220]]},{"name":"ApplyDiscountPurchHandler","line":504,"kind":"procedure","access":"local","params":0,"steps":[[512,"call","IsDisabled",0],[520,"ext","codeunit",7010,"FindPurchLineLineDisc",2],[526,"ext","codeunit",7010,"FindReqLineDisc",1]]}]}