---
id: object/codeunit/7003
type: object
title: Codeunit 7003 "Price Calculation - V15"
summary: Codeunit 7003 "Price Calculation - V15" in Base Application (Microsoft.Pricing.Calculation). 14 public procedures, 12 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24-25, BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 7252072fe8d378759103c483b07a563c80d13d11c1c3084f7f3522757d1f38cc
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Pricing/Calculation/PriceCalculationV15.Codeunit.al
    title: src/Layers/W1/BaseApp/Pricing/Calculation/PriceCalculationV15.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 7003
name: Price Calculation - V15
namespace: Microsoft.Pricing.Calculation
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 34
  events: 12
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 9
  calls: 7
  called_by: 0
  implements: 1
---

# Codeunit 7003 "Price Calculation - V15"

> Codeunit 7003 "Price Calculation - V15" in Base Application (Microsoft.Pricing.Calculation). 14 public procedures, 12 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24-25, BC28.

Base Application · Microsoft.Pricing.Calculation · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Pricing/Calculation/PriceCalculationV15.Codeunit.al) · facts from BC29

## Events published

- `OnIsDisabled(var Disabled: Boolean)` (integration)
- `OnAfterApplyPriceSalesHandler(var CurrLineWithPrice: Interface "Line With Price"; Header: Variant; Line: Variant; CalledByFieldNo: Integer)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnAfterApplyPriceSalesHandler
- `OnAfterApplyDiscountSalesHandler(var CurrLineWithPrice: Interface "Line With Price"; Header: Variant; Line: Variant)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnAfterApplyDiscountSalesHandler
- `OnAfterApplyPricePurchHandler(var CurrLineWithPrice: Interface "Line With Price"; Header: Variant; Line: Variant; CalledByFieldNo: Integer)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnAfterApplyPricePurchHandler
- `OnFindPriceListLineOnBeforeRunResourceFindCost(var ResourceCost: Record "Resource Cost"; PriceListLine: Record "Price List Line")` (integration)
- `OnBeforeApplyDiscountSalesHandler(var CurrLineWithPrice: Interface "Line With Price"; var IsHandled: Boolean)` (integration)
- `OnCountDiscount(TableID: Integer; Header: Variant; Line: Variant; ShowAll: Boolean; var Result: Integer)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnCountDiscount
- `OnCountPrice(TableID: Integer; Header: Variant; Line: Variant; ShowAll: Boolean; var Result: Integer)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnCountPrice
- `OnIsDiscountExists(TableID: Integer; Header: Variant; Line: Variant; ShowAll: Boolean; var Result: Boolean)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnIsDiscountExists
- `OnIsPriceExists(TableID: Integer; Header: Variant; Line: Variant; ShowAll: Boolean; var Result: Boolean)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnIsPriceExists
- `OnPickDiscount(TableID: Integer; Header: Variant; Line: Variant; var PriceType: Enum "Price Type")` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnPickDiscount
- `OnPickPrice(TableID: Integer; Header: Variant; Line: Variant)` (integration)
  - subscribers: [Codeunit 5984 "Serv. Price Calculation V15"](../codeunit/5984.md) OnPickPrice

## Event subscriptions

- OnFindImplementationHandler subscribes to Codeunit "Price Calculation Mgt." OnFindSupportedSetup

## Procedures

- `GetID(): Integer`
- `GetLine(var Line: Variant)`
- `Init(NewLineWithPrice: Interface "Line With Price"; PriceCalculationSetup: Record "Price Calculation Setup")`
- `ApplyDiscount()`
- `ApplyPrice(CalledByFieldNo: Integer)`
- `CountDiscount(ShowAll: Boolean): Integer`
- `CountPrice(ShowAll: Boolean): Integer`
- `FindDiscount(var TempPriceListLine: Record "Price List Line"; ShowAll: Boolean): Boolean`
- `FindPrice(var TempPriceListLine: Record "Price List Line"; ShowAll: Boolean): Boolean`
- `IsDiscountExists(ShowAll: Boolean): Boolean`
- `IsPriceExists(ShowAll: Boolean): Boolean`
- `PickDiscount()`
- `PickPrice()`
- `ShowPrices(var TempPriceListLine: Record "Price List Line")`

Plus 7 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 7000 "Sales Price Calc. Mgt."](../codeunit/7000.md) (16 calls: `ApplyDiscountSalesHandler → FindSalesLineLineDisc`, `ApplyPriceSalesHandler → FindItemJnlLinePrice`, `ApplyPriceSalesHandler → FindJobJnlLinePrice`, …)
- [Codeunit 7010 "Purch. Price Calc. Mgt."](../codeunit/7010.md) (15 calls: `ApplyDiscountPurchHandler → FindPurchLineLineDisc`, `ApplyDiscountPurchHandler → FindReqLineDisc`, `ApplyPricePurchHandler → FindItemJnlLinePrice`, …)
- [Codeunit 7008 "Price Calculation Buffer Mgt."](../codeunit/7008.md) (6 calls: `FindDiscount → FillBestLine`, `FindDiscount → GetBuffer`, `FindDiscount → GetSource`, …)
- [Codeunit 7009 "CopyFromToPriceListLine"](../codeunit/7009.md) (3 calls: `FindDiscount → CopyFrom`, `FindPrice → CopyFrom`, `ShowPrices → CopyTo`)
- [Codeunit 1004 "Job Transfer Line"](../codeunit/1004.md) (1 call: `ApplyPriceSalesHandler → JobTransferMarkerFieldNo`)
- [Codeunit 220 "Resource-Find Cost"](../codeunit/220.md) (1 call: `FindPriceListLine → (object)`)
- [Page 7007 "Get Sales Price"](../page/7007.md) (1 call: `ShowPrices → (object)`)

## Implements

- [Interface "Price Calculation"](../interface/price-calculation.md)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Price Calculation - V15")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
