---
id: object/codeunit/5968-us
type: object
title: Codeunit 5968 "Serv. Sales Tax Calculate" (US)
summary: Codeunit 5968 "Serv. Sales Tax Calculate" (US) in the US country layer (Microsoft.Finance.SalesTax). 12 public procedures, 5 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - us layer
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: 4b48b0be41b1215c89acaf5e552215240ddf086a3edf463c1dc48e8d2c2c0fa2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/NA/BaseApp/Service/Local/Finance/SalesTax/ServSalesTaxCalculate.Codeunit.al
    title: src/Layers/NA/BaseApp/Service/Local/Finance/SalesTax/ServSalesTaxCalculate.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/us
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5968
name: Serv. Sales Tax Calculate
namespace: Microsoft.Finance.SalesTax
app: Base Application
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: US
counts:
  fields: 0
  procedures: 19
  events: 5
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 5968 "Serv. Sales Tax Calculate" (US)

> Codeunit 5968 "Serv. Sales Tax Calculate" (US) in the US country layer (Microsoft.Finance.SalesTax). 12 public procedures, 5 events. Introduced in BC29, still in BC30.

US country layer · Microsoft.Finance.SalesTax · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/NA/BaseApp/Service/Local/Finance/SalesTax/ServSalesTaxCalculate.Codeunit.al) · facts from BC29

An object of the [US localization](../../localizations/us.md), not part of W1.

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Service Header" = rim, TableData "Service Line" = rim |

## Events published

- `OnBeforeDistTaxOverServLines(var ServiceLine: Record "Service Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeAddServiceLine(var ServiceLine: Record "Service Line")` (integration)
- `OnAddServiceLineOnAfterTempSalesTaxAmountLineSetFilters(var TempSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary)` (integration)
- `OnAddServiceLineOnAfterSetSalesTaxAmountLineFilter(var TempSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary; ServiceLine: Record "Service Line"; TaxAreaLine: Record "Tax Area Line")` (integration)
- `OnAfterAddServiceLine(var TempSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary; ServiceLine: Record "Service Line")` (integration)

## Procedures

- `StartSalesTaxCalculation()`
- `CallExternalTaxEngineForServ(var ServiceHeader2: Record "Service Header"; UpdateRecIfChanged: Boolean): Boolean`
- `CallExternalTaxEngineForDoc(DocTable: Integer; DocType: Option Quote,"Order",Invoice,"Credit Memo","Blanket Order","Return Order"; DocNo: Code[20]): Text[20]`
- `EndSalesTaxCalculation(PostingDate: Date)`
- `GetSummarizedSalesTaxTable(var TempSummarizedSalesTaxAmountLine: Record "Sales Tax Amount Line" temporary)`
- `AddServiceLine(ServiceLine: Record "Service Line")`
- `AddServInvoiceLines(DocNo: Code[20])`
- `AddServCrMemoLines(DocNo: Code[20])`
- `DistTaxOverServLines(var ServLine: Record "Service Line")`
- `GetSalesTaxAmountLineTable(var TempSalesTaxAmountLineTo: Record "Sales Tax Amount Line" temporary)`
- `PutSalesTaxAmountLineTable(var TempSalesTaxAmountLine2: Record "Sales Tax Amount Line" temporary; ProductArea: Integer; DocumentType: Integer; DocumentNo: Code[20])`
- `SaveTaxDifferences()`

Plus 2 local procedures.

## 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). 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: "Serv. Sales Tax Calculate")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A US country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
