---
id: object/codeunit/6201
type: object
title: Codeunit 6201 "Non-Ded. VAT Impl."
summary: Codeunit 6201 "Non-Ded. VAT Impl." in Base Application (Microsoft.Finance.VAT.Calculation). 72 public procedures, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC25-27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "27"
  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: ff5b01630f7f71940ca72ff4a0990f6ef279b512361b86dfbcd88aa35adb0e24
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/VAT/Calculation/NonDedVATImpl.Codeunit.al
    title: src/Layers/W1/BaseApp/Finance/VAT/Calculation/NonDedVATImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12141
    - change/bcapps/10880
    - change/bcapps/10609
object_type: codeunit
object_id: 6201
name: Non-Ded. VAT Impl.
namespace: Microsoft.Finance.VAT.Calculation
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "26"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 88
  events: 0
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 1
  implements: 0
---

# Codeunit 6201 "Non-Ded. VAT Impl."

> Codeunit 6201 "Non-Ded. VAT Impl." in Base Application (Microsoft.Finance.VAT.Calculation). 72 public procedures, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC25-27.

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

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata "VAT Setup" = r |

## Event subscriptions

- CreateVATSetupOnCompanyInitialize subscribes to Codeunit "Company-Initialize" OnCompanyInitialize

## Procedures

- `IsNonDeductibleVATEnabled(): Boolean`
- `ShowNonDeductibleVATInLines(): Boolean`
- `OpenVATPostingSetupPage(Notification: Notification)`
- `GetNonDeductibleVATAmount(GenJournalLine: Record "Gen. Journal Line"): Decimal`
- `GetNonDeductibleVATAmount(PurchaseLine: Record "Purchase Line"): Decimal`
- `GetNonDeductibleVATPct(VATBusPostGroupCode: Code[20]; VATProdPostGroupCode: Code[20]; GeneralPostingType: Enum "General Posting Type"): Decimal`
- `GetNonDeductibleVATPct(VATPostingSetup: Record "VAT Posting Setup"; GeneralPostingType: Enum "General Posting Type"): Decimal`
- `GetNonDeductibleVATPct(VATBusPostGroupCode: Code[20]; VATProdPostGroupCode: Code[20]; DeferralDocType: Enum "Deferral Document Type"): Decimal`
- `GetNonDeductibleVATAccForDeferrals(DeferralDocType: Enum "Deferral Document Type"; PostingGLAccountNo: Code[20]; VATPostingSetup: Record "VAT Posting Setup"): Code[20]`
- `SetNonDeductiblePct(var PurchaseLine: Record "Purchase Line")`
- `Init(var NonDedVATBase: Decimal; var NonDedVATAmount: Decimal; var NonDedVATBaseACY: Decimal; var NonDedVATAmountACY: Decimal; var NonDedVATDiff: Decimal; PurchaseLine: Record "Purchase Line"; PurchaseLineACY: Record "Purchase Line")`
- `InitNonDeductibleVATDiff(var PurchaseLine: Record "Purchase Line")`
- `Update(var PurchaseLine: Record "Purchase Line"; var TempVATAmountLineRemainder: Record "VAT Amount Line" temporary; Currency: Record Currency)`
- `Update(var PurchaseLine: Record "Purchase Line"; Currency: Record Currency)`
- `Update(var PurchaseLine: Record "Purchase Line"; Part: Decimal; Total: Decimal; AmountRoundingPrecision: Decimal)`
- `DivideNonDeductibleVATInPurchaseLine(var PurchaseLine: Record "Purchase Line"; var VATAmountLineRemainder: Record "VAT Amount Line"; VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency; Part: Decimal; Total: Decimal)`
- `ValidateVATAmountInVATAmountLine(var VATAmountLine: Record "VAT Amount Line")`
- `ValidateNonDeductibleVATInVATAmountLine(var VATAmountLine: Record "VAT Amount Line")`
- `Update(var VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency)`
- `UpdateNonDeductibleAmountsWithDiffInVATAmountLine(var VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency)`
- `SetNonDedVATAmountInPurchLine(var PurchaseLine: Record "Purchase Line"; NonDeductibleVATAmount: Decimal)`
- `SetNonDedVATAmountDiffInPurchLine(var PurchaseLine: Record "Purchase Line"; var VATAmountLineRemainder: Record "VAT Amount Line"; var VATDifference: Decimal; VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency; Part: Decimal; Total: Decimal)`
- `SetNonDeductibleVATAmount(var VATEntry: Record "VAT Entry"; NonDedVATAmount: Decimal; NonDedVATAmountACY: Decimal)`
- `SetNonDeductibleVATBase(var VATEntry: Record "VAT Entry"; NonDedVATBase: Decimal; NonDedVATBaseACY: Decimal)`
- `GetNonDedVATAmountFromVATAmountLine(var VATAmountLineRemainder: Record "VAT Amount Line"; VATAmountLine: Record "VAT Amount Line"; Currency: Record Currency; Part: Decimal; Total: Decimal): Decimal`
- `AddNonDedAmountsOfPurchLineToVATAmountLine(var VATAmountLine: Record "VAT Amount Line"; var VATAmountLineRemainder: Record "VAT Amount Line"; PurchaseLine: Record "Purchase Line"; Currency: Record Currency; Part: Decimal; Total: Decimal)`
- `CopyNonDedVATFromPurchInvLineToVATAmountLine(var VATAmountLine: Record "VAT Amount Line"; PurchInvLine: Record "Purch. Inv. Line")`
- `CopyNonDedVATFromPurchCrMemoLineToVATAmountLine(var VATAmountLine: Record "VAT Amount Line"; PurchCrMemoLine: Record "Purch. Cr. Memo Line")`
- `CopyNonDedVATAmountFromGenJnlLineToGLEntry(var GLEntry: Record "G/L Entry"; GenJournalLine: Record "Gen. Journal Line")`
- `CopyNonDedVATFromGenJnlLineToFALedgEntry(var FALedgEntry: Record "FA Ledger Entry"; GenJnlLine: Record "Gen. Journal Line")`
- `CopyNonDedVATFromGenJnlLineToJobJnlLine(var JobJnlLine: Record "Job Journal Line"; GenJnlLine: Record "Gen. Journal Line")`
- `CheckPrepmtWithNonDeductubleVATInPurchaseLine(PurchaseLine: Record "Purchase Line")`
- `CheckPrepmtVATPostingSetup(VATPostingSetup: Record "VAT Posting Setup")`
- `CheckUnrealizedVATWithNonDeductibleVATInVATPostingSetup(VATPostingSetup: Record "VAT Posting Setup")`
- `CheckVATPostingSetupChangeIsAllowed(VATPostingSetup: Record "VAT Posting Setup")`
- `CheckNonDeductibleVATPctIsAllowed(PurchaseLine: Record "Purchase Line")`
- `CheckNonDeductibleVATAmountDiff(var TempVATAmountLine: Record "VAT Amount Line" temporary; xTempVATAmountLine: Record "VAT Amount Line" temporary; AllowVATDifference: Boolean; Currency: Record Currency)`
- `Increment(var TotalVATAmountLine: Record "VAT Amount Line"; VATAmountLine: Record "VAT Amount Line")`
- `DeductNonDedValuesFromVATAmountLine(var TotalVATAmountLine: Record "VAT Amount Line"; VATAmountLineDeduct: Record "VAT Amount Line")`
- `Reverse(var PurchaseLine: Record "Purchase Line")`
- `Reverse(var InvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `Reverse(var GLEntry: Record "G/L Entry"; GLEntryToReverse: Record "G/L Entry")`
- `Reverse(var VATEntry: Record "VAT Entry")`
- `Increment(var TotalPurchaseLine: Record "Purchase Line"; PurchaseLine: Record "Purchase Line")`
- `Increment(var TotalInvoicePostingBuffer: Record "Invoice Posting Buffer"; InvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `IsNonDedFALedgEntryInFirstAcquisition(FALedgEntry: Record "FA Ledger Entry"): Boolean`
- `Update(var TotalNonDedVATBase: Decimal; var TotalNonDedVATAmount: Decimal; var TotalNonDedVATBaseACY: Decimal; var TotalNonDedVATAmountACY: Decimal; var TotalNonDedVATDiff: Decimal; InvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `SetNonDeductibleVAT(var InvoicePostingBuffer: Record "Invoice Posting Buffer"; TotalNonDedVATBase: Decimal; TotalNonDedVATAmount: Decimal; TotalNonDedVATBaseACY: Decimal; TotalNonDedVATAmountACY: Decimal; TotalNonDedVATDiff: Decimal)`
- `RoundNonDeductibleVAT(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; TotalPurchaseLine: Record "Purchase Line"; TotalPurchaseLineLCY: Record "Purchase Line")`
- `ClearNonDeductibleVAT(var PurchaseLine: Record "Purchase Line")`
- `ClearNonDeductibleVAT(var InvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `Update(var InvoicePostingBuffer: Record "Invoice Posting Buffer"; var ReminderInvoicePostingBuffer: Record "Invoice Posting Buffer"; AmountRoundingPrecision: Decimal)`
- `ValidateNonDedVATPctInGenJnlLine(var GenJournalLine: Record "Gen. Journal Line")`
- `ValidateBalNonDedVATPctInGenJnlLine(var GenJournalLine: Record "Gen. Journal Line")`
- `Calculate(var GenJournalLine: Record "Gen. Journal Line"; Currency: Record Currency)`
- `CalculateBalAcc(var GenJournalLine: Record "Gen. Journal Line"; Currency: Record Currency)`
- `Calculate(var InvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `Calculate(var NonDeductibleBaseAmount: Decimal; var NonDeductibleVATAmount: Decimal; var NonDeductibleVATAmtPerUnit: Decimal; var NonDeductibleVATAmtPerUnitLCY: Decimal; var NDVATAmountRounding: Decimal; var NDVATBaseRounding: Decimal; PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line")`
- `Copy(var InvoicePostingBuffer: Record "Invoice Posting Buffer"; PurchaseLine: Record "Purchase Line")`
- `Copy(var VATEntry: Record "VAT Entry"; GenJournalLine: Record "Gen. Journal Line")`
- `SetNonDedVATInVATEntry(var VATEntry: Record "VAT Entry"; NonDedBase: Decimal; NonDedVATAmount: Decimal; SrcCurrNonDedBaseAmount: Decimal; SrcCurrNonDedVATAmount: Decimal; NonDedVATDiff: Decimal; NonDedVATDiffACY: Decimal)`
- `ClearNonDedVATACYInVATEntry(var VATEntry: Record "VAT Entry")`
- `Copy(var GenJournalLine: Record "Gen. Journal Line"; InvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `ExchangeAccGLJournalLine(var GenJournalLine: Record "Gen. Journal Line"; CopiedGenJournalLine: Record "Gen. Journal Line")`
- `AdjustVATAmountsFromGenJnlLine(var VATAmount: Decimal; var BaseAmount: Decimal; var VATAmountACY: Decimal; var BaseAmountACY: Decimal; var GenJournalLine: Record "Gen. Journal Line")`
- `GetNonDeductibleAmount(Amount: Decimal; NonDeductiblePercent: Decimal; AmountRoundingPrecision: Decimal; var Rounding: Decimal): Decimal`
- `GetNonDeductibleVATBaseBothCurrencies(var NonDedVATBase: Decimal; var NonDedVATBaseACY: Decimal; VATEntry: Record "VAT Entry")`
- `AdjustRoundingForInvoicePostingBufferUpdate(var RoundingInvoicePostingBuffer: Record "Invoice Posting Buffer"; var CurrInvoicePostingBuffer: Record "Invoice Posting Buffer")`
- `GetNonDeductibleVATAmountForItemCost(PurchaseLine: Record "Purchase Line"): Decimal`
- `UseNonDeductibleVATAmountForFixedAssetCost(): Boolean`
- `UseNonDeductibleVATAmountForJobCost(): Boolean`
- `ApplyRoundingForFinalPostingFromInvoicePostingBuffer(var RoundingInvoicePostingBuffer: Record "Invoice Posting Buffer"; var CurrInvoicePostingBuffer: Record "Invoice Posting Buffer")`

Plus 15 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 6200 "Non-Deductible VAT"](../codeunit/6200.md) (18 calls: `AddNonDedAmountsOfPurchLineToVATAmountLine → OnBeforeAddNonDedAmountsOfPurchLineToVATAmountLine`, `AdjustVATAmountsFromGenJnlLine → OnBeforeAdjustVATAmountsFromGenJnlLine`, `CalcRevChargeVATAmountInPurchLine → OnAfterCalcRevChargeVATAmountInPurchLine`, …)

## Called by

- [Codeunit 6200 "Non-Deductible VAT"](../codeunit/6200.md) (53 calls: `AddNonDedAmountsOfPurchLineToVATAmountLine → AddNonDedAmountsOfPurchLineToVATAmountLine`, `AdjustRoundingForInvoicePostingBufferUpdate → AdjustRoundingForInvoicePostingBufferUpdate`, `AdjustVATAmountsFromGenJnlLine → AdjustVATAmountsFromGenJnlLine`, …)

## Recent changes

- 2026-10-05 [#12141 [Master]-Incorrect project ledger costs when non-deductible VAT is posted to a foreign-currency project](../../changes/bcapps/12141.md) (main, BC30, fix)
- 2026-09-10 [#10880 [29.X]-Inconsistent Validation of Non-Deductible VAT % for Purchase Lines Sharing the Same VAT Identifier](../../changes/bcapps/10880.md) (releases/29.x, BC29, fix)
- 2026-09-01 [#10609 [Master]-Inconsistent Validation of Non-Deductible VAT % for Purchase Lines Sharing the Same VAT Identifier- #10607](../../changes/bcapps/10609.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25-27

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: "Non-Ded. VAT Impl.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
