Codeunit 1302 Customer Mgt.

Base Application, Microsoft.Sales.Customer

Source AL, 770 lines

src/Layers/W1/BaseApp/Sales/Customer/CustomerMgt.Codeunit.allines 18 to 33 of 770, Copyright (c) Microsoft Corporation. MIT

codeunit 1302 "Customer Mgt."{    trigger OnRun()    begin    end;    var        FiscalYearTotals: Boolean;#if not CLEAN27    /// <summary>    /// Calculates the average number of days it takes for a customer to pay their invoices.    /// </summary>    /// <param name="CustNo">Specifies the customer number to calculate the average days to pay for.</param>    /// <returns>The average number of days to pay as a decimal value.</returns>

All 770 lines

Events 7 in 29

[IntegrationEvent] SkipSettingFilter(var SkipSetFilter: Boolean)17-29
[IntegrationEvent] OnAfterSetFilterForPostedDocs(var CustLedgEntry: Record "Cust. Ledger Entry")new in 18
[IntegrationEvent] OnAfterSetFilterForUnpostedLines(var SalesLine: Record "Sales Line")new in 18
[IntegrationEvent] OnBeforeGetTotalSales(CustNo: Code[20]; var Result: Decimal; var IsHandled: Boolean)new in 18
[IntegrationEvent] OnAfterCalculateShipBillToOptions(var ShipToOptions: Enum "Sales Ship-to Options"; var BillToOptions: Enum "Sales Bill-to Options"; SalesHeader: Record "Sales Header")new in 24
[IntegrationEvent] OnBeforeCalculateStatisticsWithCurrentCustomerValues(var Customer: Record Customer; var AdjmtCostLCY: Decimal; var AdjCustProfit: Decimal; var AdjProfitPct: Decimal; var CustInvDiscAmountLCY: Decimal; var CustPaymentsLCY: Decimal; var CustSalesLCY: Decimal; var CustProfit: Decimal; var IsHandled: Boolean)new in 24
[IntegrationEvent] OnBeforeSearchForExternalDocNo(var OriginalSalesHeader: Record "Sales Header"; var ResultFound: Boolean; var IsHandled: Boolean)new in 25

All 8 events in 17-29

Public procedures 26 in 29

AvgDaysToPay(CustNo: Code[20]): Decimal17-29
Pending, tag 27.0, obsolete since 27: Use procedure CalculatePaymentStats(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text]) instead.
CalculateStatistic(Customer: Record Customer; var AdjmtCostLCY: Decimal; var AdjCustProfit: Decimal; var AdjProfitPct: Decimal; var CustInvDiscAmountLCY: Decimal; var CustPaymentsLCY: Decimal; var CustSalesLCY: Decimal; var CustProfit: Decimal)17-29
CalcAmountsOnPostedInvoices(CustNo: Code[20]; var RecCount: Integer): Decimal17-29
CalcAmountsOnPostedCrMemos(CustNo: Code[20]; var RecCount: Integer): Decimal17-29
CalcAmountsOnOrders(CustNo: Code[20]; var RecCount: Integer): Decimal17-29
CalcAmountsOnQuotes(CustNo: Code[20]; var RecCount: Integer): Decimal17-29

All 27 procedures in 17-29

Changes 7 in 27

List17181920212223242526272829
Procedures1216
Events3311
AvgDaysToPay(CustNo: Code[20]): Decimal17-29
marked Pending, tag 27.0: Use procedure CalculatePaymentStats(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text]) instead.
CalculateShipToBillToOptions(var ShipToOptions: Option "Default (Sell-to Address)","Alternate Shipping Address","Custom Address"; var BillToOptions: Option "Default (Customer)","Another Customer","Custom Address"; var SalesHeader: Record "Sales Header")gone after 26
gone
CalculatePaymentStats(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text])new in 27
added
CalcLastPaymentInfo(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text])new in 27
added
CalcNumberOfDistinctItemsSold(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text])new in 27
added
CalculateInteractionStats(CustomerNo: Code[20]; var Stats: Dictionary of [Text, Text])new in 27
added

All 18 changes in 17-29