---
id: object/codeunit/18502-in
type: object
title: Codeunit 18502 "Charge Group Management" (IN)
summary: Codeunit 18502 "Charge Group Management" (IN) in the IN country layer (Microsoft.Finance.ChargeGroup.ChargeGroupBase). 5 public procedures, 15 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - in 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: 3605dd2ce4b4cefc60a6159c698dc0e4f675691793b166b9e24cf124f00f3458
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/IN/INChargeGroup/app/ChargeGroupBase/src/Codeunit/ChargeGroupManagement.Codeunit.al
    title: src/Apps/IN/INChargeGroup/app/ChargeGroupBase/src/Codeunit/ChargeGroupManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/in
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 18502
name: Charge Group Management
namespace: Microsoft.Finance.ChargeGroup.ChargeGroupBase
app: INChargeGroup
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: IN
counts:
  fields: 0
  procedures: 49
  events: 15
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 18502 "Charge Group Management" (IN)

> Codeunit 18502 "Charge Group Management" (IN) in the IN country layer (Microsoft.Finance.ChargeGroup.ChargeGroupBase). 5 public procedures, 15 events. Introduced in BC29, still in BC30.

IN country layer · Microsoft.Finance.ChargeGroup.ChargeGroupBase · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/IN/INChargeGroup/app/ChargeGroupBase/src/Codeunit/ChargeGroupManagement.Codeunit.al) · facts from BC29

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

## Events published

- `OnBeforeInsertChargeItemOnline(var VariantRec: Variant; var IsHandled: Boolean)` (integration)
- `OnAfterInsertChargeItemOnline(VariantRec: Variant)` (integration)
- `GetLineNoFromOtherTables(VariantRec: Variant; var LineNo: Integer)` (integration)
- `GetTotalAmountFromOtherRec(VariantRec: Variant; var TotalItemLineAmt: Decimal; var TotalItemQty: Decimal)` (integration)
- `InsertChargeGroupLineOnOtherTable(VariantRec: Variant; ChargeGroupLine: Record "Charge Group Line")` (integration)
- `FindChargeGroupFromOthTable(VariantRec: Variant; ChargeGroupCode: Code[20])` (integration)
- `CheckDocLineOnOtheTable(VariantRec: Variant; var LineExist: Boolean)` (integration)
- `RemoveChargeGroupLineOnOtherTable(VariantRec: Variant)` (integration)
- `CheckChargeGroupValuesOnOtherItemUpdate(VariantRec: Variant; ChargeGroupLine: Record "Charge Group Line"; var EntryUpdated: Boolean)` (integration)
- `CheckChargeGroupLinesExistOnOtherTable(VariantRec: Variant; var IsExist: Boolean)` (integration)
- `CalLineAmountForMoreComputationMethod(ChargeGroupLine: Record "Charge Group Line"; TotalItemLineAmt: Decimal; TotalItemQty: Decimal; var LineAmount: Decimal)` (integration)
- `OnBeforeGetPurchaseTotal(VariantRec: Variant; var TotalItemLineAmt: Decimal; var TotalItemQty: Decimal; var IsHandled: Boolean)` (integration)
- `OnAfterGetPurchaseTotal(VariantRec: Variant; var TotalItemLineAmt: Decimal; var TotalItemQty: Decimal)` (integration)
- `OnSuggestItemChargeAssignmentPurchase(PurchaseLine: Record "Purchase Line"; ChargeGroupLine: Record "Charge Group Line"; ItemChargeAssgntPurch: Codeunit "Item Charge Assgnt. (Purch.)")` (integration)
- `OnSuggestItemChargeAssignmentSales(SalesLine: Record "Sales Line"; ChargeGroupLine: Record "Charge Group Line"; ItemChargeAssgntSales: Codeunit "Item Charge Assgnt. (Sales)")` (integration)

## Procedures

- `InsertChargeItemOnLine(VariantRec: Variant)`
- `GetLineNo(VariantRec: Variant; var LineNo: Integer)`
- `GetTotalAmount(VariantRec: Variant; var TotalItemLineAmt: Decimal; var TotalItemQty: Decimal)`
- `CheckChargeLinesOnDoc(VariantRec: Variant)`
- `CalcLineAmount(ChargeGroupLine: Record "Charge Group Line"; TotalItemLineAmt: Decimal; TotalItemQty: Decimal; var LineAmount: Decimal)`

Plus 29 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: "Charge Group Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

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