---
id: object/page/161
type: object
title: Page 161 "Purchase Statistics"
summary: Page 161 "Purchase Statistics" in Base Application (Microsoft.Purchases.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: 0202f8ec22cf5924d5334f9a11386890f56b97f16c5852a29f3beb0fbc964df4
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Document/PurchaseStatistics.Page.al
    title: src/Layers/W1/BaseApp/Purchases/Document/PurchaseStatistics.Page.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/finance-how-use-non-deductible-vat
    title: Use non-deductible VAT
    date: null
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/payables-manage-payables
    title: Overview of tasks to manage accounts payable
    date: null
    commit: null
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/finance-how-use-non-deductible-vat
    - https://learn.microsoft.com/dynamics365/business-central/payables-manage-payables
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/finance/manage-payables
    - topic/business-central/business-functionality/finance/working-with-value-added-tax-vat
  localizations:
    - localization/au
    - localization/be
    - localization/nz
  videos: []
  posts: []
  guidelines: []
object_type: page
object_id: 161
name: Purchase Statistics
namespace: Microsoft.Purchases.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:
  - au
  - be
  - nz
ms_search_form_ids:
  - docs/learn-smb-docs/business-central/finance-how-use-non-deductible-vat.md
  - docs/learn-smb-docs/business-central/payables-manage-payables.md
counts:
  fields: 0
  procedures: 14
  events: 4
  subscribers: 0
  controls: 13
  actions: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 2
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Page 161 "Purchase Statistics"

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

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

## Properties

| Property | Value |
|---|---|
| Caption | Purchase Statistics |
| SourceTable | Purchase 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 | `TotalPurchLine."Line Amount"` | Specifies the net amount of all the lines in the purchase document. |
|  | Inv. Discount Amount | `TotalPurchLine."Inv. Discount Amount"` | Specifies the invoice discount amount for the purchase document. |
|  | Total | `TotalAmount1` | Specifies the total amount less any invoice discount amount and excluding VAT for the purchase document. |
|  | VAT Amount | `VATAmount` | Specifies the total VAT amount that has been calculated for all the lines in the purchase document. |
|  | Total Incl. VAT | `TotalAmount2` | Specifies the total amount including VAT that will be posted to the vendor's account for all the lines in the purchase document. This is the amount that you owe the vendor based on this purchase document. If the document is a credit memo, it is the amount that the vendor owes you. |
|  | Purchase (LCY) | `TotalPurchLineLCY.Amount` | Specifies your total purchases. It is calculated from amounts excluding VAT on all completed and open purchase invoices and credit memos. |
|  | Quantity | `TotalPurchLine.Quantity` | Specifies the total quantity of G/L account entries, items, and/or resources in the purchase document. |
|  | Parcels | `TotalPurchLine."Units per Parcel"` | Specifies the total number of parcels in the purchase document. |
|  | Net Weight | `TotalPurchLine."Net Weight"` | Specifies the total net weight of the items in the purchase document. |
|  | Gross Weight | `TotalPurchLine."Gross Weight"` | Specifies the total gross weight of the items in the purchase document. |
|  | Volume | `TotalPurchLine."Unit Volume"` | Specifies the total volume of the items in the purchase document. |
| Content | SubForm | part [Page 576 "VAT Specification Subform"](../page/576.md) | — |
| Vendor | Balance (LCY) | `Vend."Balance (LCY)"` | Specifies the balance on the vendor's account. |

## Events published

- `OnAfterCalculateTotals(var PurchHeader: Record "Purchase Header"; var TotalPurchLine: Record "Purchase Line"; var TotalPurchLineLCY: Record "Purchase Line"; var TempVATAmountLine: Record "VAT Amount Line" temporary; var TotalAmt1: Decimal; var TotalAmt2: Decimal)` (integration)
- `OnAfterUpdateHeaderInfo()` (integration)
- `OnCalculateTotalsOnAfterPurchPostSumPurchLinesTemp(var PurchHeader: Record "Purchase Header"; var TempPurchLine: Record "Purchase Line"; var AllowVATDifference: Boolean; var TotalAmount1: Decimal; var TotalAmount2: Decimal; var VATAmount: Decimal; var PurchaseLineTotal: Record "Purchase Line"; var PurchaseLineTotalLCY: Record "Purchase Line")` (integration)
- `OnOpenPageOnBeforeSetEditable(var AllowInvDisc: Boolean; var AllowVATDifference: Boolean; PurchaseHeader: Record "Purchase Header"; var PurchSetup: Record "Purchases & Payables Setup")` (integration)

## Procedures

- `UpdateTotalAmount()` (protected)
- `UpdateInvDiscAmount()` (protected)
- `GetCaptionClass(FieldCaption: Text[100]; ReverseCaption: Boolean): Text[80]` (protected)
- `UpdateVATOnPurchLines()`

Plus 6 local procedures.

## Triggers

OnAfterGetRecord, OnOpenPage, OnClosePage, OnQueryClosePage

## Relations

- source table [Table 38 "Purchase Header"](../table/38.md)

## Extended by

- [Page extension 20288 "Purch Credit Memo Stat Ext"](../pageextension/20288.md)
- [Page extension 6218 "Sust. Purch. Statistics"](../pageextension/6218.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 90 "Purch.-Post"](../codeunit/90.md) (2 calls: `CalculateTotals → GetPurchLines`, `CalculateTotals → SumPurchLinesTemp`)
- [Codeunit 66 "Purch - Calc Disc. By Type"](../codeunit/66.md) (1 call: `OnClosePage → ResetRecalculateInvoiceDisc`)

## Across versions

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

## Countries that replace it

[AU](../../localizations/au.md), [BE](../../localizations/be.md), [NZ](../../localizations/nz.md)

## Documented on Microsoft Learn

- [Use non-deductible VAT](https://learn.microsoft.com/dynamics365/business-central/finance-how-use-non-deductible-vat)
- [Overview of tasks to manage accounts payable](https://learn.microsoft.com/dynamics365/business-central/payables-manage-payables)

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