Bug 431160 - Loan account calculates wrong data
Summary: Loan account calculates wrong data
Status: RESOLVED WORKSFORME
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-04 21:08 UTC by Stefan
Modified: 2021-02-04 04:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Amortization plan (40.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-05 12:22 UTC, Thomas Baumgart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2021-01-04 21:08:53 UTC
KMyMoney Version:
```
kmymoney --version
kmymoney 5.1.0
```

**Steps to reproduce:**

1) Account -> New Account
2) Choose a bank
3) Choose account type: Load (or credit)
4) Type: Take a loan
   Frequency: monthly
   interest change rate: monthly
   fixed interest
5) loan amount: 150000 \
   interest rate: 1% \
   duration: 312 month \
   rest: 381.01
6) calculate

**Expected results:**

Amortization should be: 544.65

**Actual results:**

Amortization: 545.10

**What works**

Insert the following:

5) loan amount: 150000 \
   interest rate: 1% \
   duration: 313 month \
   amortization: 544.65 \
   rest: 0,00

But then the rest is wrong (should be 381.01) and it should be 312 rates plus one rate with the rest.
Comment 1 Thomas Baumgart 2021-01-05 12:22:15 UTC
Created attachment 134571 [details]
Amortization plan

I am not sure how you end up with those monthly payments. I tried to duplicate them using a spreadsheet using the PMT-function (attached) and get the same results as in KMyMoney, just like you do.

The details of the math behind the calculation performed in KMyMoney can be found on e.g. https://www.hughcalc.org/formula.html.

How did you calculate your values?
Comment 2 Thomas Baumgart 2021-01-05 12:22:34 UTC
Status change
Comment 3 Bug Janitor Service 2021-01-20 04:33:19 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2021-02-04 04:33:19 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!