---
id: object/codeunit/12151-it
type: object
title: Codeunit 12151 "VAT Pmt. Comm. Data Lookup" (IT)
summary: Codeunit 12151 "VAT Pmt. Comm. Data Lookup" (IT) in the IT country layer (Microsoft.Finance.VAT.Reporting). 66 public procedures, 6 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - it 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: 86c5f4a2b85e6ea90d8a75aed28d93406a1c0e8763d38e4deb5c9ed679db1f87
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/VATPmtCommDataLookup.Codeunit.al
    title: src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/VATPmtCommDataLookup.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/it
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 12151
name: VAT Pmt. Comm. Data Lookup
namespace: Microsoft.Finance.VAT.Reporting
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: IT
counts:
  fields: 0
  procedures: 76
  events: 6
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 12151 "VAT Pmt. Comm. Data Lookup" (IT)

> Codeunit 12151 "VAT Pmt. Comm. Data Lookup" (IT) in the IT country layer (Microsoft.Finance.VAT.Reporting). 66 public procedures, 6 events. Introduced in BC29, still in BC30.

IT country layer · Microsoft.Finance.VAT.Reporting · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/IT/BaseApp/Local/Finance/VAT/Reporting/VATPmtCommDataLookup.Codeunit.al) · facts from BC29

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

## Events published

- `OnGetVATPurchasesOnBeforeExit(LastPeriodicSettlementVATEntry: Record "Periodic Settlement VAT Entry"; PeriodicSettlementVATEntryFound: Boolean; var VATPurchases: Decimal)` (integration, obsolete 27.0)
- `OnAfterGetVATPurchases(LastPeriodicVATSettlementEntry: Record "Periodic VAT Settlement Entry"; PeriodicSettlementVATEntryFound: Boolean; var VATPurchases: Decimal)` (integration)
- `OnGetTotalPurchasesOnAfterVATEntrySetFilters(var VATEntry: Record "VAT Entry")` (integration)
- `OnGetTotalSalesOnAfterVATEntrySetFilters(var VATEntry: Record "VAT Entry")` (integration)
- `OnGetVATPurchasesOnAfterVATEntrySetFilters(var VATEntry: Record "VAT Entry")` (integration)
- `OnGetVATSalesOnAfterVATEntrySetFilters(var VATEntry: Record "VAT Entry")` (integration)

## Procedures

- `Init()`
- `GetStartingDate(): Date`
- `SetStartDate(StartingDate: Date)`
- `SetYearOfDeclaration(YearOfDecl: Integer)`
- `GetSupplyCode(): Text[5]`
- `SetTaxDeclarant(Value: Text[16])`
- `HasTaxDeclarant(): Boolean`
- `GetTaxDeclarant(): Text[16]`
- `SetChargeCode(Value: Text[2])`
- `HasChargeCode(): Boolean`
- `GetChargeCode(): Text[2]`
- `GetSystemID(): Text[16]`
- `GetCommunicationID(): Text[5]`
- `FormatCommunicationId(Id: Integer): Text[5]`
- `GetFiscalCode(): Code[16]`
- `GetCurrentYear(): Text[4]`
- `GetVATRegistrationNo(): Text[11]`
- `GetTaxDeclarantVATNo(): Text[16]`
- `GetTaxDeclarantPosionCode(): Text[2]`
- `GetDeclarantFiscalCode(): Text[11]`
- `SetIsSigned(Value: Boolean)`
- `GetIsSigned(): Text[1]`
- `HasIntermediary(): Boolean`
- `GetIntermediary(): Text[16]`
- `SetCommitmentSubmission(Value: Option)`
- `HasCommitmentSubmission(): Boolean`
- `GetCommitmentSubmission(): Text[1]`
- `GetIntermediaryDate(): Text[8]`
- `SetIsIntermediary(Value: Boolean)`
- `WasIntermediarySet(): Boolean`
- `GetIsIntermediary(): Text[1]`
- `SetFlagDeviations(Value: Boolean)`
- `GetFlagDeviations(): Text[1]`
- `GetSoftware(): Text`
- `GetQuarter(): Text[1]`
- `GetMonth(): Text[2]`
- `SetMethodOfCalcAdvanced(Value: Option)`
- `GetMethodOfCalcAdvancedNo(): Integer`
- `HasSubcontracting(): Boolean`
- `SetSubcontracting(Value: Boolean)`
- `GetSubcontracting(): Text[1]`
- `SetExceptions(Value: Option)`
- `HasExceptionalEvents(): Boolean`
- `GetExceptionalEvents(): Text[1]`
- `SetExtraordinaryOperations(Value: Boolean)`
- `GetExtraordinaryOperations(): Text[1]`
- `SetModuleNumber(Value: Option)`
- `GetModuleNumber(): Integer`
- `GetTotalSales(): Decimal`
- `GetTotalPurchases(): Decimal`
- `GetVATSales(): Decimal`
- `GetVATPurchases(): Decimal`
- `HasVATDebit(): Boolean`
- `GetVATDebit(): Decimal`
- `HasVATCredit(): Boolean`
- `GetVATCredit(): Decimal`
- `GetPeriodVATDebit(): Decimal`
- `GetPeriodVATCredit(): Decimal`
- `GetAnnualVATCredit(): Decimal`
- `GetCreditVATCompensation(): Decimal`
- `GetTaxDebitVariationInterest(): Decimal`
- `GetAdvancedTaxAmount(): Decimal`
- `HasTaxDebit(): Boolean`
- `GetTaxDebit(): Decimal`
- `HasTexCredit(): Boolean`
- `GetTexCredit(): Decimal`

Plus 4 local procedures.

## Triggers

OnRun

## Across versions

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

## Deprecations

- procedure OnGetVATPurchasesOnBeforeExit: Pending 27.0 (#if not CLEAN27), "This event is obsolete. Use OnAfterGetVATPurchases instead."

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: "VAT Pmt. Comm. Data Lookup")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

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