---
id: object/codeunit/20343
type: object
title: Codeunit 20343 "Tax Posting Buffer Mgmt."
summary: Codeunit 20343 "Tax Posting Buffer Mgmt." in INTaxEngine (Microsoft.Finance.TaxEngine.PostingHandler). 20 public procedures, 4 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - intaxengine
versions:
  introduced: "29"
  last_changed: null
  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: 704b90f9258ec9b8ace28ed58685c28d7077cb3d05c086dcff0cc2a7b0b9a0c3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/src/PostingManagement/codeunit/TaxPostingBufferMgmt.Codeunit.al
    title: src/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/src/PostingManagement/codeunit/TaxPostingBufferMgmt.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: 20343
name: Tax Posting Buffer Mgmt.
namespace: Microsoft.Finance.TaxEngine.PostingHandler
app: INTaxEngine
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 25
  events: 4
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 7
  implements: 0
---

# Codeunit 20343 "Tax Posting Buffer Mgmt."

> Codeunit 20343 "Tax Posting Buffer Mgmt." in INTaxEngine (Microsoft.Finance.TaxEngine.PostingHandler). 20 public procedures, 4 events. Introduced in BC29, still in BC30.

INTaxEngine · Microsoft.Finance.TaxEngine.PostingHandler · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/INTaxEngine/app/TaxEngine-PostingHandler/src/PostingManagement/codeunit/TaxPostingBufferMgmt.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| SingleInstance | true |

## Events published

- `OnBeforeSetColumnDefaultValue(RecID: RecordId; TaxTypeCode: Code[20]; var Symbols: Record "Script Symbol Value" temporary; TaxRateColumnSetup: Record "Tax Rate Column Setup"; var Value: Variant)` (integration)
- `OnBeforeSetAttribtueDefaultValue(RecID: RecordId; TaxTypeCode: Code[20]; var Symbols: Record "Script Symbol Value" temporary; TaxAttribute: Record "Tax Attribute"; var Value: Variant)` (integration)
- `OnFindTempGroupTaxPostingBuffer(var TempGroupTaxPostingBuffer: Record "Transaction Posting Buffer" temporary; TempTaxPostingBuffer: Record "Transaction Posting Buffer" temporary; Quantity: Decimal; InvoiceQty: Decimal)` (integration)
- `OnBeforeInitTempGroupTaxPostingBuffer2(var TempGroupTaxPostingBuffer2: Record "Transaction Posting Buffer" temporary; var TempGroupTaxPostingBuffer: Record "Transaction Posting Buffer" temporary; TaxID: Guid; var IsHandled: Boolean)` (integration)

## Procedures

- `SetSalesPurchLcy(GenJnlLineSalesPurchLcyAmount: Decimal)`
- `GetSalesPurchLcy(): Decimal`
- `SetDocument(Record: Variant)`
- `GetDocument(var Record: Variant)`
- `UpdateUseCaseVariables(TaxTransactionValue: Record "Tax Transaction Value"; var Symbols: Record "Script Symbol Value" temporary)`
- `UpdateFormulaComponent(var FormulaTransactionValue: Record "Tax Transaction Value" temporary; var Symbols: Record "Script Symbol Value" temporary; CurrencyCode: Code[20]; CurrencyFactor: Decimal)`
- `FillTaxBuffer(TaxID: Guid; DimensionSetID: Integer; GenBusPostingGrp: Code[20]; GenProdPostingGrp: Code[20]; TaxRecordID: RecordId; TaxTransactionValue: Record "Tax Transaction Value"; CurrencyCode: Code[20]; CurrencyFactor: Decimal; GlAccNo: Code[20]; PostingImpact: Option; ReverseCharge: Boolean; ReversaleGlAcc: Code[20]; Quantity: Decimal; InvoiceQty: Decimal; PostedDocNo: Code[20]; PostedDocLineNo: Integer)`
- `FillGroupedTaxBuffer(TempTaxPostingBuffer: Record "Transaction Posting Buffer" temporary; Quantity: Decimal; InvoiceQty: Decimal)`
- `GetGroupTaxJournal(TaxID: Guid; var TempGroupTaxPostingBuffer2: Record "Transaction Posting Buffer")`
- `GetComponentTaxJournal(TaxID: Guid; var TempTaxPostingBuffer2: Record "Transaction Posting Buffer"; RecID: RecordId)`
- `GetTaxAmount(TaxID: Guid): Decimal`
- `DivideComponentAmount(var TaxTransactionValue: Record "Tax Transaction Value"; Quantity: Decimal; InvoiceQty: Decimal; CurrencyCode: Code[20]; CurrencyFactor: Decimal)`
- `GetTransactionValues(GroupID: Guid; var TempTransactionValues2: Record "Tax Transaction Value" temporary)`
- `ClearPostingInstance()`
- `ClearNonGlComponents(TaxID: Guid)`
- `ClearGroupingBuffers(TempTransPostingBuffer: Record "Transaction Posting Buffer"; Transactionvalue: Record "Tax Transaction Value")`
- `ClearLineBuffers(TaxID: Guid)`
- `CreateTaxID()`
- `GetTaxID(): Guid`
- `GetTotalTaxAmount(): Decimal`

Plus 1 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 20134 "Script Symbol Store"](../codeunit/20134.md) (3 calls: `UpdateFormulaComponent → GetSymbolValue`, `UpdateFormulaComponent → InitSymbolContext`, `UpdateUseCaseVariables → SetDefaultSymbolValue`)
- [Codeunit 20291 "Tax Rate Computation"](../codeunit/20291.md) (2 calls: `DivideComponentAmount → RoundAmount`, `UpdateFormulaComponent → RoundAmount`)
- [Codeunit 20234 "Tax Attribute Management"](../codeunit/20234.md) (1 call: `UpdateUseCaseVariables → GetAttributeOptionIndex`)
- [Codeunit 20235 "Use Case Data Type Mgmt."](../codeunit/20235.md) (1 call: `UpdateUseCaseVariables → GetAttributeDataTypeToVariableDataType`)

## Called by

- [Codeunit 20341 "Tax Document GL Posting"](../codeunit/20341.md) (13 calls: `AdjustTaxAmountOnGenJnlLine → GetSalesPurchLcy`, `AdjustTaxAmountOnGenJnlLine → GetTaxAmount`, `PostTaxJournal → ClearGroupingBuffers`, …)
- [Codeunit 20335 "Purch.-Post Handler"](../codeunit/20335.md) (7 calls: `OnAfterPurchCrMemoLineInsert → GetTaxID`, `OnAfterPurchInvLineInsert → GetTaxID`, `OnBeforeInvoiceRoundingAmount → GetTotalTaxAmount`, …)
- [Codeunit 20336 "Sales Posting Subscribers"](../codeunit/20336.md) (7 calls: `OnAfterSalesCrMemoLineInsert → GetTaxID`, `OnAfterSalesInvLineInsert → GetTaxID`, `OnBeforeInvoiceRoundingAmount → GetTotalTaxAmount`, …)
- [Codeunit 20339 "Service Posting Subscribers"](../codeunit/20339.md) (7 calls: `OnAfterServiceCrMemoLineInsert → GetTaxID`, `OnAfterServiceInvoiceLineInsert → GetTaxID`, `OnBeforeInvoiceRoundingAmount → GetTotalTaxAmount`, …)
- [Codeunit 20340 "Fin Charge Posting Handler"](../codeunit/20340.md) (5 calls: `OnBeforePost → GetTaxID`, `OnBeforePostCustomerEntry → GetTaxID`, `OnBeforePostServiceDoc → ClearPostingInstance`, …)
- [Codeunit 20347 "Tax Subledger Posting Handler"](../codeunit/20347.md) (3 calls: `OnPostCustOnBeforeInitCustLedgEntry → SetSalesPurchLcy`, `OnPostLedgerEntryOnBeforeGenJnlPostLinePurchase → SetSalesPurchLcy`, `OnPostLedgerEntryOnBeforeGenJnlPostLineSales → SetSalesPurchLcy`)
- [Codeunit 20334 "Gen. Jnl.-Post Handler"](../codeunit/20334.md) (2 calls: `OnBeforeCode → ClearPostingInstance`, `OnBeforeCode → SetDocument`)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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