---
id: object/codeunit/1008
type: object
title: Codeunit 1008 "Job Calculate Statistics"
summary: Codeunit 1008 "Job Calculate Statistics" in Base Application (Microsoft.Projects.Project.Job). 13 public procedures, 6 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: ef19920d5ddf615cb8e3e2ce696a572408b148179db826f6b314f0ee70678477
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Projects/Project/Job/JobCalculateStatistics.Codeunit.al
    title: src/Layers/W1/BaseApp/Projects/Project/Job/JobCalculateStatistics.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: 1008
name: Job Calculate Statistics
namespace: Microsoft.Projects.Project.Job
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: 22
  events: 6
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 5
  implements: 0
---

# Codeunit 1008 "Job Calculate Statistics"

> Codeunit 1008 "Job Calculate Statistics" in Base Application (Microsoft.Projects.Project.Job). 13 public procedures, 6 events. Present since at least BC23, still in BC30.

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

## Events published

- `OnAfterJobCalculateCommonFilters(var Job: Record Job; var JobLedgerEntry: Record "Job Ledger Entry"; var JobPlanningLine: Record "Job Planning Line")` (integration)
- `OnAfterJTCalculateCommonFilters(JobTask: Record "Job Task"; var JobTask2: Record "Job Task"; var Job2: Record Job; UseJobFilter: Boolean; var JobLedgerEntry: Record "Job Ledger Entry"; var JobPlanningLine: Record "Job Planning Line")` (integration)
- `OnAfterReportAnalysis(AmountField: array[8] of Option " ",SchPrice,UsagePrice,ContractPrice,InvoicedPrice,SchCost,UsageCost,ContractCost,InvoicedCost,SchProfit,UsageProfit,ContractProfit,InvoicedProfit; CurrencyField: array[8] of Option LCY,FCY; var Amt: array[8] of Decimal)` (integration)
- `OnCalcJobPlanAmountsOnAfterJobPlanningLineSetFilters(var JobPlanningLine: Record "Job Planning Line")` (integration)
- `OnReportAnalysisOnAfterGetAmounts(var PL: array[16] of Decimal; var CL: array[16] of Decimal; var P: array[16] of Decimal; var C: array[16] of Decimal; var I: Integer)` (integration)
- `OnShowPlanningLineOnAfterJobPlanningLineSetFilters(var JobPlanningLine: Record "Job Planning Line")` (integration)

## Procedures

- `ReportAnalysis(var Job2: Record Job; var JT: Record "Job Task"; var Amt: array[8] of Decimal; AmountField: array[8] of Option " ",SchPrice,UsagePrice,ContractPrice,InvoicedPrice,SchCost,UsageCost,ContractCost,InvoicedCost,SchProfit,UsageProfit,ContractProfit,InvoicedProfit; CurrencyField: array[8] of Option LCY,FCY; JobLevel: Boolean)`
- `ReportSuggBilling(var Job2: Record Job; var JT: Record "Job Task"; var Amt: array[8] of Decimal; CurrencyField: array[8] of Option LCY,FCY)`
- `RepJobCustomer(var Job2: Record Job; var Amt: array[8] of Decimal)`
- `JobCalculateCommonFilters(var Job: Record Job)`
- `JTCalculateCommonFilters(var JT2: Record "Job Task"; var Job2: Record Job; UseJobFilter: Boolean)`
- `CalculateAmounts()`
- `GetLCYCostAmounts(var Amt: array[16] of Decimal)`
- `GetCostAmounts(var Amt: array[16] of Decimal)`
- `GetLCYPriceAmounts(var Amt: array[16] of Decimal)`
- `GetPriceAmounts(var Amt: array[16] of Decimal)`
- `ShowPlanningLine(JobType: Option " ",Resource,Item,GL; Schedule: Boolean)`
- `ShowLedgEntry(JobType: Option " ",Resource,Item,GL; Usage: Boolean)`
- `GetHeadLineText(AmountField: array[8] of Option " ",SchPrice,UsagePrice,BillablePrice,InvoicedPrice,SchCost,UsageCost,BillableCost,InvoicedCost,SchProfit,UsageProfit,BillableProfit,InvoicedProfit; CurrencyField: array[8] of Option LCY,FCY; var HeadLineText: array[8] of Text[50]; Job: Record Job)`

Plus 3 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 1007 "Job Planning Lines"](../page/1007.md) (1 call: `ShowPlanningLine → (object)`)

## Called by

- [Codeunit 759 "Job Chart Mgt"](../codeunit/759.md) (12 calls: `CalculateJobCosts → CalculateAmounts`, `CalculateJobCosts → GetLCYCostAmounts`, `CalculateJobCosts → GetLCYPriceAmounts`, …)
- [Page 1024 "Job Task Statistics"](../page/1024.md) (6 calls: `OnAfterGetCurrRecord → CalculateAmounts`, `OnAfterGetCurrRecord → GetCostAmounts`, `OnAfterGetCurrRecord → GetLCYCostAmounts`, …)
- [Page 1025 "Job Statistics"](../page/1025.md) (6 calls: `OnAfterGetCurrRecord → CalculateAmounts`, `OnAfterGetCurrRecord → GetCostAmounts`, `OnAfterGetCurrRecord → GetLCYCostAmounts`, …)
- [Table 167 "Job"](../table/167.md) (6 calls: `PercentCompleted → CalculateAmounts`, `PercentCompleted → GetLCYCostAmounts`, `PercentCompleted → JobCalculateCommonFilters`, …)
- [Page 1030 "Job Cost Factbox"](../page/1030.md) (4 calls: `OnAfterGetCurrRecord → CalculateAmounts`, `OnAfterGetCurrRecord → GetLCYCostAmounts`, `OnAfterGetCurrRecord → GetLCYPriceAmounts`, …)

## 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: "Job Calculate Statistics")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
