---
id: object/page/160
type: object
title: Page 160 "Sales Statistics"
summary: Page 160 "Sales Statistics" in Base Application (Microsoft.Sales.Document). 4 public procedures, 4 events. Present since at least BC23, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - page
  - base application
versions:
  introduced: null
  last_changed: "26"
  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: 797770bc4a484b92d9aa6a4ecb954647fc335caef940e15ace919f3d2a41afa9
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Document/SalesStatistics.Page.al
    title: src/Layers/W1/BaseApp/Sales/Document/SalesStatistics.Page.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/ru
  videos: []
  posts: []
  guidelines: []
object_type: page
object_id: 160
name: Sales Statistics
namespace: Microsoft.Sales.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries:
  - ru
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 14
  events: 4
  subscribers: 0
  controls: 22
  actions: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 2
  event_subscribers: 0
  calls: 2
  called_by: 1
  implements: 0
---

# Page 160 "Sales Statistics"

> Page 160 "Sales Statistics" in Base Application (Microsoft.Sales.Document). 4 public procedures, 4 events. Present since at least BC23, still in BC30, changed in BC26.

Base Application · Microsoft.Sales.Document · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Document/SalesStatistics.Page.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Sales Statistics |
| SourceTable | Sales Header |
| PageType | ListPlus |

## Fields on this page

Layout controls in source order, grouped by the container they sit in. Shows: the table field a control is bound to (or its expression as written); ToolTip: the control's own, else the bound field's (marked).

| Group | Control | Shows | ToolTip |
|---|---|---|---|
| General | Amount | `TotalSalesLine."Line Amount"` | Specifies the net amount of all the lines in the sales document. |
|  | Inv. Discount Amount | `TotalSalesLine."Inv. Discount Amount"` | Specifies the invoice discount amount for the sales document. |
|  | Total | `TotalAmount1` | Specifies the total amount less any invoice discount amount and excluding VAT for the sales document. |
|  | VAT Amount | `VATAmount` | Specifies the total VAT amount that has been calculated for all the lines in the sales document. |
|  | Total Incl. VAT | `TotalAmount2` | Specifies the total amount including VAT that will be posted to the customer's account for all the lines in the sales document. This is the amount that the customer owes based on this sales document. If the document is a credit memo, it is the amount that you owe to the customer. |
|  | Sales (LCY) | `TotalSalesLineLCY.Amount` | Specifies your total sales turnover in the fiscal year. It is calculated from amounts excluding VAT on all completed and open sales invoices and credit memos. |
|  | Original Profit (LCY) | `ProfitLCY` | Specifies the original profit that was associated with the sales when they were originally posted. |
|  | Adjusted Profit (LCY) | `AdjProfitLCY` | Specifies the profit, taking into consideration changes in the purchase prices of the goods. |
|  | Original Profit % | `ProfitPct` | Specifies the original percentage of profit that was associated with the sales when they were originally posted. |
|  | Adjusted Profit % | `AdjProfitPct` | Specifies the percentage of profit for all sales, taking into account changes that occurred in the purchase prices of the goods. |
|  | Quantity | `TotalSalesLine.Quantity` | Specifies the total quantity of G/L account entries, items, and/or resources in the sales document. If the amount is rounded, because the Invoice Rounding check box is selected in the Sales & Receivables Setup window, this field will contain the quantity of items in the sales document plus one. |
|  | Parcels | `TotalSalesLine."Units per Parcel"` | Specifies the total number of parcels in the sales document. |
|  | Net Weight | `TotalSalesLine."Net Weight"` | Specifies the total net weight of the items in the sales document. |
|  | Gross Weight | `TotalSalesLine."Gross Weight"` | Specifies the total gross weight of the items in the sales document. |
|  | Volume | `TotalSalesLine."Unit Volume"` | Specifies the total volume of the items in the sales document. |
|  | Original Cost (LCY) | `TotalSalesLineLCY."Unit Cost (LCY)"` | Specifies the total cost, in LCY, of the G/L account entries, items, and/or resources in the sales document. The cost is calculated as unit cost x quantity of the items or resources. |
|  | Adjusted Cost (LCY) | `TotalAdjCostLCY` | Specifies the total cost, in LCY, of the items in the sales document, adjusted for any changes in the original costs of these items. If this field contains zero, it means that there were no entries to calculate, possibly because of date compression or because the adjustment batch job has not yet bee... |
|  | Cost Adjmt. Amount (LCY) | `TotalAdjCostLCY - TotalSalesLineLCY."Unit Cost (LCY)"` | Specifies the difference between the original cost and the total adjusted cost of the items in the sales document. |
| Content | SubForm | part [Page 576 "VAT Specification Subform"](../page/576.md) | — |
| Customer | Balance (LCY) | `Cust."Balance (LCY)"` | Specifies the balance on the customer's account. |
|  | Credit Limit (LCY) | `Cust."Credit Limit (LCY)"` | Specifies the credit limit of the customer on the sales document. The value 0 represents unlimited credit. |
|  | Expended % of Credit Limit (LCY) | `CreditLimitLCYExpendedPct` | Specifies the expended percentage of the credit limit in (LCY). |

## Events published

- `OnAfterCalculateTotals(var SalesHeader: Record "Sales Header"; var TotalSalesLine: Record "Sales Line"; var TotalSalesLineLCY: Record "Sales Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TotalAmt1: Decimal; var TotalAmt2: Decimal)` (integration)
- `OnAfterUpdateHeaderInfo(TotalSalesLineLCY: Record "Sales Line"; var TotalAmount1: Decimal; var TotalAmount2: Decimal)` (integration)
- `OnCalculateTotalsOnAfterGetSalesLines(SalesHeader: Record "Sales Header"; var TempSalesLine: Record "Sales Line" temporary)` (integration)
- `OnOpenPageOnBeforeSetEditable(var AllowInvDisc: Boolean; var AllowVATDifference: Boolean; SalesHeader: Record "Sales Header"; SalesSetup: Record "Sales & Receivables Setup")` (integration)

## Procedures

- `UpdateTotalAmount()` (protected)
- `UpdateInvDiscAmount()` (protected)
- `GetCaptionClass(FieldCaption: Text[100]; ReverseCaption: Boolean): Text[80]` (protected)
- `UpdateVATOnSalesLines()`: Updates VAT amounts on sales lines based on modifications made to the VAT amount lines.

Plus 6 local procedures.

## Triggers

OnAfterGetRecord, OnOpenPage, OnClosePage, OnQueryClosePage

## Relations

- source table [Table 36 "Sales Header"](../table/36.md)

## Extended by

- [Page extension 20290 "Sales Stats Ext"](../pageextension/20290.md)
- [Page extension 6242 "Sust. Sales Statistics"](../pageextension/6242.md)

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

- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (2 calls: `CalculateTotals → GetSalesLines`, `CalculateTotals → SumSalesLinesTemp`)
- [Codeunit 56 "Sales - Calc Discount By Type"](../codeunit/56.md) (1 call: `OnClosePage → ResetRecalculateInvoiceDisc`)

## Called by

- [Codeunit 99000839 "Sales Get Demand To Reserve"](../codeunit/99000839.md) (1 call: `OnShowStatistics → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26

## Countries that replace it

[RU](../../localizations/ru.md)

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: "page", object_name: "Sales Statistics")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
