Skip to main content

Notifications

Microsoft Dynamics SL forum
Suggested answer

Avg. Days to pay calculation algorithm

Posted on by 1,465

Hi,

I'm wondering if it's possible to find out how AvgDayToPay is calculated in the AR_BALANCES table.

Thanks!

  • Suggested answer
    CFROTON Profile Picture
    CFROTON 4,710 on at
    RE: Avg. Days to pay calculation algorithm

    I found this tech article that hopefully explains the situation.

    I did a simple test on an invoice for 12/01 not paid in full until 01/15..the ADTP is 45, which seems right in the case of one invoice and one payment fully applied.

    Issue:

    When and how is the Average Days to Pay calculated in the Customer Credit Summary window (Cards|Sales|Summary|Credit Summary)?

    Resolution:

    The Average Days to Pay field is updated when a debit document is fully applied. The average is recalculated as the document is fully applied and unapplied. The check date is always used when calculating the average. The Average Days to Pay (ADTP) is calculated after the first customer invoice has been fully APPLIED. The formula for the calculation is as follows:

    (Current ADTP x Number of Paid Invoices) + Number of Days to Pay Invoice Just Paid ______________________________________________________________________

    Number of Paid Invoices + 1

    *The 'Current ADTP' is the last Average Days to Pay found in the Customer Credit Summary window.

    *The 'Number of Paid Invoices' is the number of FULLY applied invoices, but NOT including the invoice just paid.

    *The 'Number of Days to Pay Invoice Just Paid' is the check date minus the invoice date for the last invoice and check.

    EXAMPLES: Assume that NO other invoices have been entered into Receivables yet. The invoices are being entered into Receivables in the other that they are given. All of the checks were entered in Cash Receipts (Transactions|Sales|Cash Receipts).

    Invoice Date Check Date # of Days to Pay Calculation ADTP

    1) 5/23/97 6/1/97 9 ((0x0) + 9) / 0+1 9

    2) 6/1/97 9/1/97 92 ((9x1) + 92) / 1+1 50

    3) 7/1/97 7/21/97 20 ((50x2) + 20) / 2+1 40

    4) 4/1/97 6/15/97 75 ((40x3) + 75) / 3+1 48

    Notice that in 1) the 'Number of Paid Invoices' used in the calculation is zero. That is because this is the first invoice being paid. When 2) was entered, there is now 1 paid invoice, so the calculation uses 1, NOT 2. The paid invoice is NEVER included in the number of paid invoices. Also, the ADTP result from the previous invoice is used in the calculation of the invoice which follows.

    NOTE: The '"Number of Paid Invoices'" is afield in the Customer Summary window (Cards|Sales|Summary) that can be edited. This field also has values for Year-to-Date and Life-to-Date . The Average Days to Pay field on the Customer Credit Summary window (Cards|Sales|Summary|Credit Summary) can also be edited. Changing the number in EITHER one of these two fields will change the calculation of the next paid invoice. If the Year-to-Date value for the 'Number of Paid Invoices' is changed, it will NOT affect the Life-to-Date value and calculation. The following is an example: Before entering the next transaction, I accidently changed the Year-to-Date field for the 'Number of Paid Invoices' from 4 (the number of invoices fully paid from above) to 10. Here is the result:

    5) 10/1/97 10/3/97 2 ((48x10) + 2) / 10+1 43

    Notice that the 'Number of Paid Invoices' used in the calculation is now 10 rather than 4. If I hadn't changed the field, the calculation would have been: ((48x4) + 2) / 4+1 = 38

  • Cherie Kane Profile Picture
    Cherie Kane 595 on at
    RE: Avg. Days to pay calculation algorithm

    Here is what I have found:

    Average Days to Pay (ADP) computes only closed documents and not partial payments.  

    There could be an error in the AR_Balances table

    a.       AR_Balances.NbrInvcPaid is the number of invoices paid within the retention period for calculating average days to pay. This field is set during the closing process and when an invoice is paid completely in the Payment Application dialog box or in the Release AR Batches process for auto-apply customers.

    b.       AR_Balances.PaidInvcDays is the total days outstanding for invoices paid within the retention period for average days to pay. This is also updated in closing and is updated by the release process for invoices paid completely in the Payment Application dialog box or in the Release AR Batches process for auto-apply customers.

    c.       The AR_Balances.AvgDayToPay field is calculated from the AR_Balances.PaidInvcDays value divided by the AR_Balances.NbrInvcPaid value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,469 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans