---
title: "Codeunit 7002 Price Calculation - V16"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/7002-price-calculation-v16/
type: codeunit
id: 7002
name: "Price Calculation - V16"
app: "Base Application"
namespace: Microsoft.Pricing.Calculation
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/7002-price-calculation-v16/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 7002 Price Calculation - V16

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/7002-price-calculation-v16/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Pricing.Calculation |
| Versions | 17-28 |
| Source file | Pricing/Calculation/PriceCalculationV16.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| GetLine | (var Variant) | - | public | 17-28 | - | - |
| Init | (Interface Line With Price, Record Price Calculation Setup) | - | public | 17-28 | - | - |
| ApplyDiscount | () | - | public | 17-28 | - | - |
| ApplyPrice | (Integer) | - | public | 17-28 | - | - |
| CountDiscount | (Boolean) | Integer | public | 17-28 | - | - |
| CountPrice | (Boolean) | Integer | public | 17-28 | - | - |
| FindDiscount | (var Record Price List Line, Boolean) | Boolean | public | 17-28 | - | - |
| FindPrice | (var Record Price List Line, Boolean) | Boolean | public | 17-28 | - | - |
| IsDiscountExists | (Boolean) | Boolean | public | 17-28 | - | - |
| IsPriceExists | (Boolean) | Boolean | public | 17-28 | - | - |
| PickDiscount | () | - | public | 17-28 | - | - |
| PickPrice | () | - | public | 17-28 | - | - |
| ShowPrices | (var Record Price List Line) | - | public | 17-28 | - | - |
| IsBetterLine | (var Record Price List Line, Enum Price Amount Type, Record Price List Line) | Boolean | public | 17-28 | - | - |
| AmountTypeFromPriceType | (Enum Price Type) | Enum Price Amount Type | public | 17-24 | Pending 17.0 | AmountType::Cost is replaced by the combination of AmountType::Price with PriceType::Purchase. |
| FindLines | (Enum Price Amount Type, var Record Price List Line, var Codeunit Price Calculation Buffer Mgt., Boolean) | Boolean | public | 17-28 | - | - |
| CopyLinesBySource | (var Record Price List Line, Record Price Source, var Codeunit Price Asset List, var Record Price List Line) | Boolean | public | 17-28 | - | - |
| CopyLinesBySource | (var Record Price List Line, Record Price Source, Record Price Asset, var Record Price List Line) | Boolean | public | 17-28 | - | - |
| CalcBestAmount | (Enum Price Amount Type, var Codeunit Price Calculation Buffer Mgt., var Record Price List Line) | Boolean | public | 17-28 | - | - |
| IsDegradedLine | (Record Price List Line, Record Price List Line) | Boolean | public | 22-28 | - | - |
| IsImprovedLine | (Record Price List Line, Record Price List Line) | Boolean | public | 22-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterIsBetterLine | (Record Price List Line, Enum Price Amount Type, Record Price List Line, var Boolean) | 17-28 | - | - |
| Integration event | OnAfterPickBestLine | (Enum Price Amount Type, Record Price List Line, var Record Price List Line, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeCalcBestAmount | (Enum Price Amount Type, var Codeunit Price Calculation Buffer Mgt., var Record Price List Line) | 17-28 | - | - |
| Integration event | OnIsDisabled | (var Boolean) | 17-28 | - | - |
| Integration event | OnAfterIsDegradedLine | (Record Price List Line, Record Price List Line, var Boolean) | 18-28 | - | - |
| Integration event | OnAfterIsImprovedLine | (Record Price List Line, Record Price List Line, var Boolean) | 18-28 | - | - |
| Integration event | OnBeforePickBestLine | (Enum Price Amount Type, Record Price List Line, var Record Price List Line, var Boolean, var Boolean) | 19-28 | - | - |
| Integration event | OnFindLinesOnBefoerPriceSourceListGetMinMaxLevel | (var Codeunit Price Asset List, var Codeunit Price Source List, Enum Price Amount Type, var Codeunit Price Calculation Buffer Mgt.) | 19-21 | - | - |
| Integration event | OnAfterCalcBestAmount | (Enum Price Amount Type, var Codeunit Price Calculation Buffer Mgt., var Record Price List Line) | 20 | - | - |
| Integration event | OnBeforeFindLines | (Enum Price Amount Type, var Record Price List Line, var Codeunit Price Calculation Buffer Mgt., Boolean, var Boolean, var Boolean) | 21-28 | - | - |
| Integration event | OnAfterCalcBestAmount | (Enum Price Amount Type, var Codeunit Price Calculation Buffer Mgt., var Record Price List Line, var Boolean) | 21-28 | - | - |
| Integration event | OnFindLinesOnBefoerPriceSourceListGetMinMaxLevel | (var Codeunit Price Asset List, var Codeunit Price Source List, Enum Price Amount Type, var Codeunit Price Calculation Buffer Mgt., Boolean) | 22-28 | - | - |
| Integration event | OnAfterFindLines | (Enum Price Amount Type, var Record Price List Line, var Codeunit Price Calculation Buffer Mgt., Boolean, var Boolean) | 22-28 | - | - |
| Integration event | OnBeforeShowPrices | (var Record Price List Line, Interface Line With Price) | 22-28 | - | - |
| Integration event | OnApplyDiscountOnBeforeFillBestLine | (var Record Price List Line, var Codeunit Price Calculation Buffer Mgt.) | 25-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
