---
title: "Codeunit 9082 Calculate Customer Stats., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/points/
object: https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 9082 Calculate Customer Stats., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/points/

3 procedures and triggers with a step in src/Layers/W1/BaseApp/Sales/Customer/CalculateCustomerStats.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 12](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L12), trigger.

- [22](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L22) calls `GetCustomerNoLabel`
- [26](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L26) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `GetBalanceAsVendor`
- [28](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L28) calls `CalcLastPaymentDate`
- [29](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L29) calls `GetBalanceAsVendorLabel`
- [30](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L30) calls `GetLinkedVendorNoLabel`
- [31](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L31) calls `GetTotalAmountLCYLabel`
- [31](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L31) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `GetTotalAmountLCY`
- [32](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L32) calls `GetOverdueBalanceLabel`
- [32](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L32) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `CalcOverdueBalance`
- [33](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L33) calls `GetSalesLCYLabel`
- [33](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L33) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `GetSalesLCY`
- [34](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L34) calls `GetInvoicedPrepmtAmountLCYLabel`
- [34](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L34) calls [Table 18 Customer](https://jonas-paprotka.de/ref/table/18-customer/) `GetInvoicedPrepmtAmountLCY`
- [36](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L36) raises `OnCalculateCustomerStatistics`

## CalcLastPaymentDate

[Line 50](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L50), local.

- [54](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L54) calls [Codeunit 1302 Customer Mgt.](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/) `CalcLastPaymentInfo`

## GetLastPaymentDateLabel

[Line 57](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L57), internal.

- [61](https://jonas-paprotka.de/ref/codeunit/9082-calculate-customer-stats/source/#L61) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetLastPaymentDateLabel`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
