web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Inaccuracy with calculated finance charge amount using Average daily balance BC 19 US on-premise

(7) ShareShare
ReportReport
Posted on by 22

I have a client running on BC19 on-premise US and have discovered inaccuracies in some of the finance charge memo amounts calculated by the system, or at least they believe it do be inaccurate. In the below snippet, we have the two relevant entries from the detailed customer ledger entry table. Any assistance in explaining how the system gets the amount would be appreciated.

The output  for the finance charge amount from the system is $108.98. 

This is the piece of code I debugged in the Finance Charge Memo Lines table to figure out how the system calculates the amount.

 

BC does the calculates this in a strange way when compare to the MS documentation but it may make more sense to you:

1. We get this accumulated amount: difference between date of initial entry of invoice vs. May 9th 2024 (760 days) * Initial invoice entry amount $667.30 = $507,148

2. We get this accumulated amount: difference between date of application of the credit memo vs. May 9th 2024 (217 days) * Credit memo entry amount -$443.96 = -$96339.30

3. The difference between #1 and #2 outputs = $410808.70 which is then run through this calculation: ($410808.70 / 30) * (79167/100) = $108.40. BUT WE ARE STILL OFF BY $0.58. See further down.

Somehow when BC calculates the difference between the credit memo posting date and today's date it gets 212.112 days...... I have no clue how and I can see the dates in the code to confirm that the output is created by 05/10/2023 (dd/mm/yyyy) - 09/05/2024 (dd/mm/yyyy). Any assistance in explaining this is greatly appreciated.

I have the same question (0)
  • Suggested answer
    Jeffrey Bulanadi Profile Picture
    6,939 on at
    Inaccuracy with calculated finance charge amount using Average daily balance BC 19 US on-premise

    Hi

    Per checking, It’s clear you’ve done some solid debugging. The discrepancy in the finance charge memo amount ($108.98 vs. $108.40) and the unexpected day count (212.112 instead of 217) likely stems from how BC19 calculates interest using the Average Daily Balance method, especially when partial applications and decimal day factors are involved.

    Here’s what’s happening under the hood:

    1. BC uses fractional day weights

    • The system doesn’t always treat days as whole integers—it can apply weighted averages based on how long each entry affects the balance
    • For example, if the credit memo was applied mid-day or across multiple entries, BC may calculate a weighted average of 212.112 days instead of a flat 217

    2. Interest calculation formula nuance

    • The formula you’re seeing: ((Sum of (Amount × Days)) / 30) × (Interest Rate / 100) is correct, but BC may apply rounding logic or internal decimal precision that slightly shifts the result
    • Even a small rounding difference in the day count or interest rate (e.g., 79.167% vs. 79.17%) can cause a $0.58 delta

    3. Application entries affect balance timeline

    • The credit memo entry (Entry No. 76100) is marked as Application, which means it adjusts the balance retroactively
    • BC recalculates the effective balance timeline based on when the credit was applied, not just posted
    • This can lead to non-intuitive day counts if the application spans multiple ledger entries or is backdated

    4. Debugging tip

    • Use the Finance Charge Memo Lines debugger to trace the CalcInterestAmount function
    • Look for any calls to CalcDaysBetweenDates or CalcAverageDailyBalance—these often reveal fractional day logic


    MS documentation confirms that BC uses either Average Daily Balance or Balance Due methods, and that the former can include weighted day calculations.

    If you find this helpful, feel free to mark this as the suggested or verified answer.

    Cheers
    Jeffrey

  • Suggested answer
    YUN ZHU Profile Picture
    89,974 Super User 2025 Season 2 on at
    Inaccuracy with calculated finance charge amount using Average daily balance BC 19 US on-premise
    In addition, BC19 has stopped supporting for two years, please upgrade to the latest version as soon as possible.
  • KasparsSemjonovs Profile Picture
    4,511 Super User 2025 Season 2 on at
    Inaccuracy with calculated finance charge amount using Average daily balance BC 19 US on-premise
    Check if there is a grace period indicated on the Finance Charge Terms, and also - it could be system calculates from the Due Date of the document, not the Posting Date.

    But I don't get how You receive 760 days between "October 31 2022" and "May 9th 2024". It is less than 2 years and I get 556 (or 557 if you include the 1st day as well).

    If the difference at the end is very small, maybe system calculates including the 1st day - so You can try to re-check the calculations that way.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,737 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,577

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,251

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans