---
id: object/page/10038-us
type: object
title: Page 10038 "Sales Order Stats." (US)
summary: Page 10038 "Sales Order Stats." (US) in the US country layer (Microsoft.Sales.Document). 1 public procedures, 2 events. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - page
  - us 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: ac500d68b0ffc9388a405ca61a8036e55a017b97a7336e7f8f585924a05cdc96
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/NA/BaseApp/Local/Sales/Document/SalesOrderStats.Page.al
    title: src/Layers/NA/BaseApp/Local/Sales/Document/SalesOrderStats.Page.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/us
  videos: []
  posts: []
  guidelines: []
object_type: page
object_id: 10038
name: Sales Order Stats.
caption: Sales Order Statistics
namespace: Microsoft.Sales.Document
app: Base Application
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: US
counts:
  fields: 0
  procedures: 16
  events: 2
  subscribers: 0
  controls: 81
  actions: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Page 10038 "Sales Order Stats." (US)

> Page 10038 "Sales Order Stats." (US) in the US country layer (Microsoft.Sales.Document). 1 public procedures, 2 events. Introduced in BC29, still in BC30.

US country layer · Microsoft.Sales.Document · captioned "Sales Order Statistics" · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/NA/BaseApp/Local/Sales/Document/SalesOrderStats.Page.al) · facts from BC29

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

## Properties

| Property | Value |
|---|---|
| Caption | Sales Order Statistics |
| SourceTable | Sales Header |
| PageType | Card |

## 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 | TotalSalesLine[1].""Line Amount"" | `TotalSalesLine[1]."Line Amount"` | — |
|  | Inv. Discount Amount | `TotalSalesLine[1]."Inv. Discount Amount"` | Specifies the invoice discount amount for the entire document. If the Calc. Inv. Discount field in the Sales & Receivables Setup window is selected, the discount is automatically calculated. |
|  | TotalAmount1[1] | `TotalAmount1[1]` | — |
|  | Tax Amount | `VATAmount[1]` | Specifies the tax amount. |
|  | TotalAmount2[1] | `TotalAmount2[1]` | — |
|  | Sales ($) | `TotalSalesLineLCY[1].Amount` | Specifies the sales amount. |
|  | Profit ($) | `ProfitLCY[1]` | Specifies the profit expressed as an amount. |
|  | Adjusted Profit ($) | `AdjProfitLCY[1]` | Specifies the difference between the amounts in the Amount and Cost fields on the sales order. |
|  | Original Profit % | `ProfitPct[1]` | Specifies the profit, expressed as a percentage, that was associated with the sales order when it was originally posted. |
|  | Adjusted Profit % | `AdjProfitPct[1]` | Specifies the adjusted profit of the sales order expressed as a percentage. |
|  | Quantity | `TotalSalesLine[1].Quantity` | Specifies the item quantity. |
|  | Parcels | `TotalSalesLine[1]."Units per Parcel"` | Specifies the number of parcels on the document. |
|  | Net Weight | `TotalSalesLine[1]."Net Weight"` | Specifies the net weight of items on the sales order. |
|  | Gross Weight | `TotalSalesLine[1]."Gross Weight"` | Specifies the gross weight of items on the document. |
|  | Volume | `TotalSalesLine[1]."Unit Volume"` | Specifies the volume of the items in the sales order. |
|  | Original Cost ($) | `TotalSalesLineLCY[1]."Unit Cost (LCY)"` | Specifies the original cost of the items on the sales document. |
|  | Adjusted Cost ($) | `TotalAdjCostLCY[1]` | Specifies the adjusted cost of the items on the sales order. |
|  | Cost Adjmt. Amount ($) | `TotalAdjCostLCY[1] - TotalSalesLineLCY[1]."Unit Cost (LCY)"` | Specifies the adjusted cost of the sales order based on the total adjusted cost, total sales, and unit cost. |
|  | BreakdownTitle | label | — |
|  | BreakdownAmt | `BreakdownAmt[1, 1]` | — |
|  | BreakdownAmt | `BreakdownAmt[1, 2]` | — |
|  | BreakdownAm | `BreakdownAmt[1, 3]` | — |
|  | BreakdownAm | `BreakdownAmt[1, 4]` | — |
|  | No. of Tax Lines | `TempSalesTaxLine1.Count` | Specifies the number of sales tax lines on the sales order. |
|  | Reserved from stock | `Rec.GetQtyReservedFromStockState()` | Specifies what part of the sales order is reserved from inventory. |
| Invoicing | TotalSalesLine[2].""Line Amount"" | `TotalSalesLine[2]."Line Amount"` | — |
|  | Inv. Discount Amount | `TotalSalesLine[2]."Inv. Discount Amount"` | Specifies the invoice discount amount for the entire sales document. If the Calc. Inv. Discount field in the Sales & Receivables Setup window is selected, the discount is automatically calculated. |
|  | TotalAmount1[2] | `TotalAmount1[2]` | — |
|  | Tax Amount | `VATAmount[2]` | Specifies the tax amount. |
|  | TotalAmount2[2] | `TotalAmount2[2]` | — |
|  | Sales ($) | `TotalSalesLineLCY[2].Amount` | Specifies the sales amount. |
|  | Original Profit (LCY) | `ProfitLCY[2]` | Specifies the profit, expressed as an amount in local currency, which was associated with the sales order when it was originally posted. |
|  | Adjusted Profit ($) | `AdjProfitLCY[2]` | Specifies the difference between the amounts in the Amount and Cost fields on the sales order. |
|  | Original Profit % | `ProfitPct[2]` | Specifies the profit, expressed as a percentage, that was associated with the sales order when it was originally posted. |
|  | Adjusted Profit % | `AdjProfitPct[2]` | Specifies the adjusted profit of the sales order expressed as a percentage. |
|  | Quantity | `TotalSalesLine[2].Quantity` | Specifies the item quantity. |
|  | Parcels | `TotalSalesLine[2]."Units per Parcel"` | Specifies the number of parcels on the document. |
|  | Net Weight | `TotalSalesLine[2]."Net Weight"` | Specifies the net weight of items on the sales order. |
|  | Gross Weight | `TotalSalesLine[2]."Gross Weight"` | Specifies the gross weight of items on the document. |
|  | Volume | `TotalSalesLine[2]."Unit Volume"` | Specifies the volume of the items in the sales order. |
|  | Original Cost (LCY) | `TotalSalesLineLCY[2]."Unit Cost (LCY)"` | Specifies the original cost of the items on the sales document. |
|  | Adjusted Cost ($) | `TotalAdjCostLCY[2]` | Specifies the adjusted cost of the items on the sales order. |
|  | Cost Adjmt. Amount ($) | `TotalAdjCostLCY[2] - TotalSalesLineLCY[2]."Unit Cost (LCY)"` | Specifies the adjusted cost of the sales order based on the total adjusted cost, total sales, and unit cost. |
|  | BreakdownTitle2 | label | — |
|  | BreakdownAmt | `BreakdownAmt[2, 1]` | — |
|  | BreakdownAmt | `BreakdownAmt[2, 2]` | — |
|  | BreakdownAmt | `BreakdownAmt[2, 3]` | — |
|  | BreakdownAmt | `BreakdownAmt[2, 4]` | — |
|  | No. of Tax Lines | `TempSalesTaxLine2.Count` | Specifies the number of sales tax lines on the sales order. |
| Shipping | TotalSalesLine[3].""Line Amount"" | `TotalSalesLine[3]."Line Amount"` | — |
|  | Inv. Discount Amount | `TotalSalesLine[3]."Inv. Discount Amount"` | Specifies the invoice discount amount for the entire sales document. If the Calc. Inv. Discount field in the Sales & Receivables Setup window is selected, the discount is automatically calculated. |
|  | TotalAmount1[3] | `TotalAmount1[3]` | — |
|  | Tax Amount | `VATAmount[3]` | Specifies the tax amount. |
|  | TotalAmount2[3] | `TotalAmount2[3]` | — |
|  | Sales ($) | `TotalSalesLineLCY[3].Amount` | Specifies the sales amount. |
|  | Cost ($) | `TotalSalesLineLCY[3]."Unit Cost (LCY)"` | Specifies the cost of the sales order, rounded according to the Amount Rounding Precision field in the Currencies window. |
|  | Profit ($) | `ProfitLCY[3]` | Specifies the profit expressed as an amount. |
|  | Profit % | `ProfitPct[3]` | Specifies the profit expressed as a percentage. |
|  | Quantity | `TotalSalesLine[3].Quantity` | Specifies the item quantity. |
|  | Parcels | `TotalSalesLine[3]."Units per Parcel"` | Specifies the number of parcels on the document. |
|  | Net Weight | `TotalSalesLine[3]."Net Weight"` | Specifies the net weight of items on the sales order. |
|  | Gross Weight | `TotalSalesLine[3]."Gross Weight"` | Specifies the gross weight of items on the document. |
|  | Volume | `TotalSalesLine[3]."Unit Volume"` | Specifies the volume of the items in the sales order. |
|  | BreakdownTitle3 | label | — |
|  | BreakdownAmt | `BreakdownAmt[3, 1]` | — |
|  | BreakdownAmt | `BreakdownAmt[3, 2]` | — |
|  | BreakdownAmt | `BreakdownAmt[3, 3]` | — |
|  | BreakdownAmt | `BreakdownAmt[3, 4]` | — |
|  | No. of Tax Lines | `TempSalesTaxLine3.Count` | Specifies the number of sales tax lines on the sales order. |
| Prepayment | PrepmtTotalAmount | `PrepmtTotalAmount` | — |
|  | Prepayment Amount Invoiced | `PrepmtVATAmount` | Specifies the total prepayment amount that has been invoiced for the sales order. |
|  | PrepmtTotalAmount2 | `PrepmtTotalAmount2` | — |
|  | TotalSalesLine[1].""Prepmt. Amt. Inv."" | `TotalSalesLine[1]."Prepmt. Amt. Inv."` | — |
|  | Invoiced % of Prepayment Amt. | `PrepmtInvPct` | Specifies the Invoiced Percentage of Prepayment Amt. |
|  | TotalSalesLine[1].""Prepmt Amt Deducted"" | `TotalSalesLine[1]."Prepmt Amt Deducted"` | — |
|  | Deducted % of Prepayment Amt. to Deduct | `PrepmtDeductedPct` | Specifies the Deducted Percentage of Prepayment Amt. to Deduct. |
|  | TotalSalesLine[1].""Prepmt Amt to Deduct"" | `TotalSalesLine[1]."Prepmt Amt to Deduct"` | — |
|  | No. of Tax Lines | `TempSalesTaxLine1.Count` | Specifies the number of sales tax lines on the sales order. |
| Customer | Balance ($) | `Cust."Balance (LCY)"` | Specifies the customer's balance. |
|  | Credit Limit ($) | `Cust."Credit Limit (LCY)"` | Specifies the credit limit in dollars of the customer on the sales document. The value 0 represents unlimited credit. |
|  | Expended % of Credit Limit ($) | `CreditLimitLCYExpendedPct` | Specifies how must of the customer's credit is used, expressed as a percentage of the credit limit. |

## Events published

- `OnAfterGetRecordOnBeforeCalcCreditLimit(SalesHeader: Record "Sales Header"; var Customer: Record Customer; TotalAmount2: array[3] of Decimal)` (integration)
- `OnBeforeCalculateSalesTaxSalesOrderStats(var SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var i: Integer; var SalesTaxAmountLine1: Record "Sales Tax Amount Line"; var SalesTaxAmountLine2: Record "Sales Tax Amount Line"; var SalesTaxAmountLine3: Record "Sales Tax Amount Line"; var SalesTaxAmountLine4: Record "Sales Tax Amount Line"; var SalesTaxCalculationOverridden: Boolean)` (integration)

## Procedures

- `VATLinesDrillDown(var VATLinesToDrillDown: Record "Sales Tax Amount Line"; ThisTabAllowsVATEditing: Boolean; ActiveTab: Option General,Invoicing,Shipping,Prepayment)`

Plus 13 local procedures.

## Triggers

OnAfterGetRecord, OnOpenPage, OnClosePage, OnQueryClosePage

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

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