---
id: object/codeunit/148121-it
type: object
title: Codeunit 148121 "Intrastat Report Management IT" (IT)
summary: Codeunit 148121 "Intrastat Report Management IT" (IT) in the IT country layer (Microsoft.Inventory.Intrastat). 9 public procedures, 10 events, 16 event subscribers. 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: e1bca700e258bcfe18cff3cbb2c26d5df54afb8d8794728d24526ea50995a08d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/IT/IntrastatIT/app/src/IntrastatReportManagementIT.Codeunit.al
    title: src/Apps/IT/IntrastatIT/app/src/IntrastatReportManagementIT.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: 148121
name: Intrastat Report Management IT
namespace: Microsoft.Inventory.Intrastat
app: IntrastatIT
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: 51
  events: 10
  subscribers: 16
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 148121 "Intrastat Report Management IT" (IT)

> Codeunit 148121 "Intrastat Report Management IT" (IT) in the IT country layer (Microsoft.Inventory.Intrastat). 9 public procedures, 10 events, 16 event subscribers. Introduced in BC29, still in BC30.

IT country layer · Microsoft.Inventory.Intrastat · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/IT/IntrastatIT/app/src/IntrastatReportManagementIT.Codeunit.al) · facts from BC29

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

## Properties

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

## Events published

- `OnAfterGetCountryOfOriginCode(var IntrastatReportLine: Record "Intrastat Report Line"; var CountryOfOriginCode: Code[10])` (integration)
- `OnBeforeGetPartnerID(var IntrastatReportLine: Record "Intrastat Report Line"; var PartnerID: Text[50]; var IsHandled: Boolean)` (integration)
- `OnAfterGetPartnerIDFromJobEntry(var IntrastatReportLine: Record "Intrastat Report Line"; Customer: Record Customer; var Result: Text[50])` (integration)
- `OnBeforeGetPartnerIDFromItemEntry(var IntrastatReportLine: Record "Intrastat Report Line"; var Result: Text[50])` (integration)
- `OnBeforeGetPartnerIDFromFAEntry(var IntrastatReportLine: Record "Intrastat Report Line"; var Result: Text[50])` (integration)
- `OnCalculateTotalsOnAfterSumTotals(var ItemLedgerEntry: Record "Item Ledger Entry"; IntrastatReportHeader: Record "Intrastat Report Header"; var TotalAmt: Decimal; var TotalCostAmt: Decimal)` (integration)
- `OnAfterCalculateTotals(var ItemLedgerEntry: Record "Item Ledger Entry"; IntrastatReportHeader: Record "Intrastat Report Header"; var TotalAmt: Decimal; var TotalCostAmt: Decimal)` (integration)
- `OnBeforeInsertItemLedgerLine(var IntrastatReportLine: Record "Intrastat Report Line"; ItemLedgerEntry: Record "Item Ledger Entry"; var IsHandled: Boolean)` (integration)
- `OnBeforeGetPartnerIDForCountryIT(CountryRegionCode: Code[10]; VATRegistrationNo: Text[50]; IsPrivatePerson: Boolean; IsThirdPartyTrade: Boolean; var PartnerID: Text[50]; var IsHandled: Boolean)` (integration)
- `OnBeforeDefineFileNamesIT(var IntrastatReportHeader: Record "Intrastat Report Header"; var FileName: Text; var ReceptFileName: Text; var ShipmentFileName: Text; var ZipFileName: Text; var IsHandled: Boolean)` (integration)

## Event subscriptions

- OnBeforeInitSetup subscribes to Codeunit "IntrastatReportManagement" OnBeforeInitSetup
- OnBeforeInitCheckList subscribes to Codeunit "IntrastatReportManagement" OnBeforeInitCheckList
- OnBeforeExportIntrastatHeader subscribes to Codeunit "IntrastatReportManagement" OnBeforeExportIntrastatHeader
- OnAfterInitRequestPage subscribes to Report "Intrastat Report Get Lines" OnAfterInitRequestPage
- OnBeforeFilterItemLedgerEntry subscribes to Report "Intrastat Report Get Lines" OnBeforeFilterItemLedgerEntry
- OnBeforeFilterValueEntry subscribes to Report "Intrastat Report Get Lines" OnBeforeFilterValueEntry
- OnBeforeCheckDropShipment subscribes to Report "Intrastat Report Get Lines" OnBeforeCheckDropShipment
- OnAfterCheckItemLedgerEntry subscribes to Report "Intrastat Report Get Lines" OnAfterCheckItemLedgerEntry
- OnBeforeCalculateTotalsCall subscribes to Report "Intrastat Report Get Lines" OnBeforeCalculateTotalsCall
- OnBeforeInsertItemLedgerLineCall subscribes to Report "Intrastat Report Get Lines" OnBeforeInsertItemLedgerLineCall
- OnBeforeInsertJobLedgerLine subscribes to Report "Intrastat Report Get Lines" OnBeforeInsertJobLedgerLine
- OnBeforeFormatToText subscribes to Codeunit "Payment Export Mgt" OnBeforeFormatToText
- OnProcessColumnMappingOnBeforeCheckLength subscribes to Codeunit "Payment Export Mgt" OnProcessColumnMappingOnBeforeCheckLength
- OnBeforeCreateDefaultDataExchangeDef subscribes to Codeunit "IntrastatReportManagement" OnBeforeCreateDefaultDataExchangeDef
- OnBeforeInsertFALedgerLine subscribes to Report "Intrastat Report Get Lines" OnBeforeInsertFALedgerLine
- OnBeforeCheckDateInRange subscribes to Table "Intrastat Report Line" OnBeforeCheckDateInRange

## Procedures

- `GetIntrastatCountryCode(CountryRegionCode: Code[10]): Code[10]` (internal)
- `SetIntrastatHeader(var IntrastatReportHeader2: Record "Intrastat Report Header")` (internal)
- `GetIntrastatHeader(): Record "Intrastat Report Header"` (internal)
- `SetTotals(TotalRoundedAmount2: Integer; LineCount2: Integer)` (internal)
- `GetTotals(var TotalRoundedAmount2: Integer; var LineCount2: Integer)` (internal)
- `RemoveLeadingCountryCode(CodeParameter: Text[50]; CountryCode: Text[10]): Text[20]` (internal)
- `IsEU3PartyTrade(IntrastatReportLine: Record "Intrastat Report Line"): Boolean` (internal)
- `GetCompanyRepresentativeVATNo(): Text[20]` (internal)
- `CreateDefaultDataExchangeDef()`

Plus 16 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: "Intrastat Report Management IT")`, 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.
