---
id: object/codeunit/7008
type: object
title: Codeunit 7008 "Price Calculation Buffer Mgt."
summary: Codeunit 7008 "Price Calculation Buffer Mgt." in Base Application (Microsoft.Pricing.Calculation). 24 public procedures, 11 events. Present since at least BC23, still in BC30, changed in BC24, BC26.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "26"
  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: 2e0ccd06769137cc64aab152ad757d75b4c16ef54d0c18aa04b6b68945d1badb
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Pricing/Calculation/PriceCalculationBufferMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Pricing/Calculation/PriceCalculationBufferMgt.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: 7008
name: Price Calculation Buffer Mgt.
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"
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 37
  events: 11
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 12
  implements: 0
---

# Codeunit 7008 "Price Calculation Buffer Mgt."

> Codeunit 7008 "Price Calculation Buffer Mgt." in Base Application (Microsoft.Pricing.Calculation). 24 public procedures, 11 events. Present since at least BC23, still in BC30, changed in BC24, BC26.

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

## Events published

- `OnAfterCalcUnitAmountRoundingPrecision(PriceCalculationBuffer: Record "Price Calculation Buffer"; var UnitAmountRoundingPrecision: Decimal)` (integration)
- `OnAfterGetAssets(PriceCalculationBuffer: Record "Price Calculation Buffer"; var NewPriceAssetList: Codeunit "Price Asset List")` (integration)
- `OnAfterGetSources(PriceCalculationBuffer: Record "Price Calculation Buffer"; var TempPriceSource: Record "Price Source"; var Found: Boolean)` (integration)
- `OnAfterGetSourcesNewPriceSourceList(var PriceCalculationBuffer: Record "Price Calculation Buffer"; var NewPriceSourceList: Codeunit "Price Source List")` (integration)
- `OnAfterSetFilters(var PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; var PriceCalculationBuffer: Record "Price Calculation Buffer"; ShowAll: Boolean)` (integration)
- `OnAfterSetLineDiscountPctForPickBestLine(PriceCalculationBuffer: Record "Price Calculation Buffer"; var PriceListLine: Record "Price List Line")` (integration)
- `OnBeforeConvertAmount(AmountType: Enum "Price Amount Type"; var PriceListLine: Record "Price List Line"; PriceCalculationBuffer: Record "Price Calculation Buffer"; var IsHandled: Boolean)` (integration)
- `OnBeforeIsInMinQty(PriceListLine: Record "Price List Line"; PriceCalculationBuffer: Record "Price Calculation Buffer"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeSet(var PriceCalculationBuffer: Record "Price Calculation Buffer")` (integration)
- `OnConvertAmountByTaxOnAfterVATPostingSetupGet(var VATPostingSetup: Record "VAT Posting Setup"; var Amount: Decimal; var IsHandled: Boolean; var PriceCalculationBuffer: Record "Price Calculation Buffer")` (integration)
- `OnBeforeConvertAmountByCurrency(var PriceListLine: Record "Price List Line"; var Amount: Decimal; var PriceCalculationBuffer: Record "Price Calculation Buffer")` (integration)

## Procedures

- `AddAsset(AssetType: Enum "Price Asset Type"; AssetNo: Code[20])`
- `AddSource(SourceType: Enum "Price Source Type"; ParentSourceNo: Code[20]; SourceNo: Code[20])`
- `AddSource(SourceType: Enum "Price Source Type"; SourceNo: Code[20])`
- `AddSource(SourceType: Enum "Price Source Type")`
- `GetAsset(var PriceAsset: Record "Price Asset")`
- `GetAssets(var NewPriceAssetList: Codeunit "Price Asset List")`
- `GetBuffer(var ResultPriceCalculationBuffer: Record "Price Calculation Buffer")`
- `GetSource(SourceType: Enum "Price Source Type"): Code[20]`
- `GetSources(var TempPriceSource: Record "Price Source" temporary): Boolean`
- `GetSources(var NewPriceSourceList: Codeunit "Price Source List")`
- `SetAssets(var NewPriceAssetList: Codeunit "Price Asset List")`
- `SetSources(var NewPriceSourceList: Codeunit "Price Source List")`
- `Set(NewPriceCalculationBuffer: Record "Price Calculation Buffer"; var PriceSourceList: Codeunit "Price Source List")`
- `RoundPrice(var Price: Decimal)`
- `IsInMinQty(PriceListLine: Record "Price List Line"): Boolean`
- `ConvertAmount(AmountType: Enum "Price Amount Type"; var PriceListLine: Record "Price List Line")`
- `ConvertAmountByTax(var PriceListLine: Record "Price List Line"; var Amount: Decimal)`
- `ConvertAmountByUnitOfMeasure(var PriceListLine: Record "Price List Line"; var Amount: Decimal)`
- `ConvertAmountByCurrency(var PriceListLine: Record "Price List Line"; var Amount: Decimal)`
- `SetLineDiscountPctForPickBestLine(var PriceListLine: Record "Price List Line")`
- `FillBestLine(AmountType: Enum "Price Amount Type"; var PriceListLine: Record "Price List Line")`
- `SetFiltersOnPriceListLine(var PriceListLine: Record "Price List Line"; AmountType: Enum "Price Amount Type"; ShowAll: Boolean)`
- `RestoreFilters(var PriceListLine: Record "Price List Line")`
- `VerifySelectedLine(PriceListLine: Record "Price List Line")`

Plus 2 local procedures.

## 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 7007 "Price Asset List"](../codeunit/7007.md) (5 calls: `AddAsset → Add`, `GetAssets → Copy`, `Set → Add`, …)
- [Codeunit 7011 "Price Source List"](../codeunit/7011.md) (4 calls: `AddSource → Add`, `GetSource → GetValue`, `GetSources → GetList`, …)

## Called by

- [Codeunit 7002 "Price Calculation - V16"](../codeunit/7002.md) (13 calls: `ApplyDiscount → FillBestLine`, `ApplyPrice → FillBestLine`, `CalcBestAmount → ConvertAmount`, …)
- [Codeunit 7003 "Price Calculation - V15"](../codeunit/7003.md) (6 calls: `FindDiscount → FillBestLine`, `FindDiscount → GetBuffer`, `FindDiscount → GetSource`, …)
- [Codeunit 7020 "Sales Line - Price"](../codeunit/7020.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7021 "Purchase Line - Price"](../codeunit/7021.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7022 "Item Journal Line - Price"](../codeunit/7022.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7023 "Job Journal Line - Price"](../codeunit/7023.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7024 "Job Planning Line - Price"](../codeunit/7024.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7025 "Requisition Line - Price"](../codeunit/7025.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7026 "Service Line - Price"](../codeunit/7026.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7027 "Std. Item Jnl. Line - Price"](../codeunit/7027.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7028 "Res. Journal Line - Price"](../codeunit/7028.md) (1 call: `CopyToBuffer → Set`)
- [Codeunit 7029 "Price List Line - Price"](../codeunit/7029.md) (1 call: `CopyToBuffer → Set`)

## Across versions

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

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 Buffer Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
