---
id: object/codeunit/7380
type: object
title: Codeunit 7380 "Phys. Invt. Count.-Management"
summary: Codeunit 7380 "Phys. Invt. Count.-Management" in Base Application (Microsoft.Inventory.Counting.Journal). 12 public procedures, 17 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  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: 2a63b1fbef336a558a0d29ae04c66a3ff6db7a8e6a5a17aeabb21d993b0e7f57
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Counting/Journal/PhysInvtCountManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Counting/Journal/PhysInvtCountManagement.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 7380
name: Phys. Invt. Count.-Management
namespace: Microsoft.Inventory.Counting.Journal
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 41
  events: 17
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 3
  implements: 0
---

# Codeunit 7380 "Phys. Invt. Count.-Management"

> Codeunit 7380 "Phys. Invt. Count.-Management" in Base Application (Microsoft.Inventory.Counting.Journal). 12 public procedures, 17 events. Present since at least BC23, still in BC30.

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

## Events published

- `OnBeforeCalcInvtQtyOnHand(DocNo: Code[20]; PostingDate: Date; ZeroQty: Boolean; var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; var IsHandled: Boolean; var ItemJournalLine: Record "Item Journal Line"; var Item: Record Item)` (integration)
- `OnBeforeCalcWhseQtyOnHand(DocNo: Code[20]; PostingDate: Date; ZeroQty: Boolean; var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; var IsHandled: Boolean; var WhseJnlLine: Record "Warehouse Journal Line")` (integration)
- `OnBeforeCreatePhysInvtItemJnl(var ItemJournalLine: Record "Item Journal Line"; var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; var IsHandled: Boolean)` (integration)
- `OnBeforeCreatePhysInvtOrderLines(TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var IsHandled: Boolean)` (integration)
- `OnBeforePrintPhysInvtList(var ItemJournalBatch: Record "Item Journal Batch"; PrintQtyCalculated: Boolean; var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; var IsHandled: Boolean; var PrintDocPerItem: Boolean; var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnBeforePrintWhseInvtList(var WarehouseJournalBatch: Record "Warehouse Journal Batch"; PrintQtyCalculated: Boolean; var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; var IsHandled: Boolean)` (integration)
- `OnCreateCustomPhysInvtJournal(var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection" temporary; SortingMethod: Option " ",Item,Bin; HideValidationDialog: Boolean)` (integration)
- `OnRunOnAfterSetItemFilters(var Item: Record Item; SourceJnl: Option ItemJnl,WhseJnl,PhysInvtOrder,Custom)` (integration)
- `OnRunOnAfterSetSKUFilters(var StockkeepingUnit: Record "Stockkeeping Unit"; SourceJnl: Option ItemJnl,WhseJnl,PhysInvtOrder,Custom)` (integration)
- `OnBeforeRun(var WhseJnlLine: Record "Warehouse Journal Line"; var SourceJnl: Option)` (integration)
- `OnRunOnSKUOnBeforeInsertTempPhysCountBuffer(var Item: Record Item; SKU: Record "Stockkeeping Unit"; var IsHandled: Boolean)` (integration)
- `OnRunOnBeforeRunModalPhysInvtItemSelection(var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection"; var IsHandled: Boolean)` (integration)
- `OnAfterInsertTempPhysCountBuffer(var TempPhysInvtItemSelection: Record "Phys. Invt. Item Selection"; PhysInvtCountCode: Code[10])` (integration)
- `OnCreatePhysInvtWhseJnlOnBeforeCalculatePhysInvtCountingRunModal(var CalculatePhysInvtCounting: Report "Calculate Phys. Invt. Counting"; SortingMethod: Option; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateSKUPhysInvtCount(var SKU: Record "Stockkeeping Unit")` (integration)
- `OnAfterUpdateSKUPhysInvtCount(var SKU: Record "Stockkeeping Unit")` (integration)
- `OnCreatePhysInvtOrderLinesOnBeforeCalcPhysInvtOrderLinesRunModal(var CalcPhysInvtOrderCount: Report "Calc. Phys. Invt. Order Count"; ZeroQty: Boolean; CalcQtyExpected: Boolean; var Item: Record Item; var CalcPhysInvtOrderLines: Report "Calc. Phys. Invt. Order Lines")` (integration)

## Procedures

- `CalcPeriod(LastDate: Date; var NextCountingStartDate: Date; var NextCountingEndDate: Date; CountFrequency: Integer)`
- `InitFromItemJnl(ItemJnlLine2: Record "Item Journal Line")`
- `InitFromWhseJnl(WhseJnlLine2: Record "Warehouse Journal Line")`
- `InitFromCustomJnl()`
- `GetSortingMethod(var SortingMethod2: Option " ",Item,Bin)`
- `UpdateSKUPhysInvtCount(var SKU: Record "Stockkeeping Unit")`
- `UpdateItemPhysInvtCount(var Item: Record Item)`
- `UpdateItemSKUListPhysInvtCount()`
- `AddToTempItemSKUList(ItemNo: Code[20]; LocationCode: Code[10]; VariantCode: Code[10]; PhysInvtCountingPeriodType: Option " ",Item,SKU)`
- `InitTempItemSKUList()`
- `SetHideValidationDialog(NewHideValidationDialog: Boolean)`
- `InitFromPhysInvtOrder(PhysInvtOrderHeader2: Record "Phys. Invt. Order Header")`

Plus 12 local procedures.

## Triggers

OnRun

## 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.

- [Page 7380 "Phys. Invt. Item Selection"](../page/7380.md) (1 call: `OnRun → (object)`)

## Called by

- [Codeunit 23 "Item Jnl.-Post Batch"](../codeunit/23.md) (3 calls: `Code → UpdateItemSKUListPhysInvtCount`, `PostLines → AddToTempItemSKUList`, `PostLines → InitTempItemSKUList`)
- [Codeunit 5884 "Phys. Invt. Order-Post"](../codeunit/5884.md) (3 calls: `Code → AddToTempItemSKUList`, `Code → InitTempItemSKUList`, `Code → UpdateItemSKUListPhysInvtCount`)
- [Codeunit 7304 "Whse. Jnl.-Register Batch"](../codeunit/7304.md) (3 calls: `Code → AddToTempItemSKUList`, `Code → InitTempItemSKUList`, `Code → UpdateItemSKUListPhysInvtCount`)

## Across versions

- Present in: BC23-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). 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: "Phys. Invt. Count.-Management")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
