---
id: object/codeunit/12101-it
type: object
title: Codeunit 12101 "Withholding - Contribution" (IT)
summary: Codeunit 12101 "Withholding - Contribution" (IT) in the IT country layer (Microsoft.Finance.WithholdingTax). 10 public procedures, 11 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: 09a445cd3f4ddc82d5161f9bb37d909f453385406b8739a8815575d13e30c727
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/IT/BaseApp/Local/Finance/WithholdingTax/WithholdingContribution.Codeunit.al
    title: src/Layers/IT/BaseApp/Local/Finance/WithholdingTax/WithholdingContribution.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: 12101
name: Withholding - Contribution
namespace: Microsoft.Finance.WithholdingTax
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: 23
  events: 11
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 12101 "Withholding - Contribution" (IT)

> Codeunit 12101 "Withholding - Contribution" (IT) in the IT country layer (Microsoft.Finance.WithholdingTax). 10 public procedures, 11 events. Introduced in BC29, still in BC30.

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

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

## Events published

- `OnBeforeCalculateWithholdingTax(var PurchaseHeader: Record "Purchase Header"; Recalculate: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateTmpWithhSocSec(var GenJournalLine: Record "Gen. Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforePostPayments(var TmpWithholdingContribution: Record "Tmp Withholding Contribution"; GenJournalLine: Record "Gen. Journal Line"; CalledFromVendBillLine: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeTmpWithholdingSocSecInsert(var TmpWithholdingContribution: Record "Tmp Withholding Contribution"; ComputedWithholdingTax: Record "Computed Withholding Tax"; GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeWithholdingTaxInsert(var WithholdingTax: Record "Withholding Tax"; TmpWithholdingContribution: Record "Tmp Withholding Contribution"; GenJnlLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeWithholdApplicable(TmpWithholdingContribution: Record "Tmp Withholding Contribution"; CalledFromVendBillLine: Boolean; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeWithholdLineFilter(var WithholdCodeLine: Record "Withhold Code Line"; WithholdCode: Code[20]; ValidityDate: Date; var IsHandled: Boolean)` (integration)
- `OnCalculateWithholdingTaxOnRecalculate(var PurchWithhContribution: Record "Purch. Withh. Contribution"; PurchaseHeader: Record "Purchase Header"; var TotAmount: Decimal)` (integration)
- `OnCalculateWithholdingTaxOnAfterPurchLineSetFilters(var PurchLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header")` (integration)
- `OnGetRemainingWithhTaxAmountOnAfterVendLedgEntrySetFilters(var VendLedgEntry: Record "Vendor Ledger Entry"; CreateVendLedgEntry: Record "Vendor Ledger Entry"; ComputedWithholdingTax: Record "Computed Withholding Tax"; AppliestoOccurrenceNo: Integer)` (integration)
- `OnPostPaymentsOnBeforeComputedWithholdingTaxModify(var TempWithholdingSocSec: Record "Tmp Withholding Contribution"; var ComputedWithholdingTax: Record "Computed Withholding Tax")` (integration)

## Procedures

- `PostPayments(var TempWithholdingSocSec: Record "Tmp Withholding Contribution"; GenJnlLine: Record "Gen. Journal Line"; CalledFromVendBillLine: Boolean)`
- `CalculateWithholdingTax(var PurchHeader: Record "Purchase Header"; Recalculate: Boolean)`
- `CreateTmpWithhSocSec(var GenJnlLine: Record "Gen. Journal Line")`
- `WithholdLineFilter(var WithholdCodeLine: Record "Withhold Code Line"; WithholdCode: Code[20]; ValidityDate: Date)`
- `SetSocSecLineFilters(var SocSecCodeLine: Record "Contribution Code Line"; SocialSecurityCode: Code[20]; StartingDate: Date; TipoContributo: Option INPS,INAIL)`
- `SetSocSecBracketFilters(var SocSecBracketLine: Record "Contribution Bracket Line"; SocialSecurityBracketCode: Code[10]; TipoContributo: Option INPS,INAIL; Code: Code[20])`
- `GetRemainingWithhTaxAmount(ComputedWithholdingTax: Record "Computed Withholding Tax"; AppliestoOccurrenceNo: Integer): Decimal`
- `WithholdApplicable(TempWithholdingSocSec: Record "Tmp Withholding Contribution"; CalledFromVendBillLine: Boolean): Boolean`
- `SocialSecurityApplicable(TempWithholdingSocSec: Record "Tmp Withholding Contribution"; CalledFromVendBillLine: Boolean): Boolean`
- `GetCompContribRemGrossAmtForVendorInPeriod(VendorNo: Code[20]; StartDate: Date; EndDate: Date): Decimal`

Plus 2 local procedures.

## Triggers

OnRun

## 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: "Withholding - Contribution")`, 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.
