Bug 513387 - The calculation of interest and amortization of a loan seems not to work any more
Summary: The calculation of interest and amortization of a loan seems not to work any ...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: git (master)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-15 08:12 UTC by Thomas Baumgart
Modified: 2025-12-16 10:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.2.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2025-12-15 08:12:27 UTC
SUMMARY
In the split editor it just shows “calculated” for the interest. But maybe that is intended behaviour. In the transaction details it shows for amortization as well as interest a value of “-92.233.720.368.547.758,07“. Maybe an overflow or the like?

Not sure if it is induced by newer AppImages or Ubuntu 25.10. With older AppImages and Ubuntu 25.04 it was working well.

kmymoney-5.2-5001-linux-gcc-x86_64.AppImage

STEPS TO REPRODUCE
1. Show future payments on homepage with an active loan schedule
2. Edit the loan schedule (using the Shift+Edit method in the context menu)
3. Modify the total amount
4. Save the schedule

OBSERVED RESULT
Future payment on homepage shows the large number

EXPECTED RESULT
Future payment on homepage shows the correct amounts
Comment 1 Bug Janitor Service 2025-12-15 17:02:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/316
Comment 2 Thomas Baumgart 2025-12-16 00:01:21 UTC
Git commit 5b5b55c9680523a846257f8849a583bd3bf5c22d by Thomas Baumgart.
Committed on 15/12/2025 at 11:18.
Pushed by ostroffjh into branch 'master'.

Keep the schedule type for loans

Using the new edit feature for scheduled loan transactions changed the
type of the schedule from loan-payment to bill. This resulted in the
automatic calculation of the values for interest and amortization not
being performed correctly in other areas of the application and
incorrect data being displayed.

The change also includes a correction of the data in case a non-loan
type schedule contains automatically calculated split values back to
type loan for erroneous records.
FIXED-IN: 5.2.2

M  +28   -2    kmymoney/mymoney/mymoneyfile.cpp
M  +1    -1    kmymoney/mymoney/mymoneyfile.h
M  +1    -1    kmymoney/plugins/sql/mymoneydbdef.cpp
M  +2    -2    kmymoney/plugins/sql/mymoneystoragesql.cpp
M  +51   -4    kmymoney/plugins/sql/mymoneystoragesql_p.h
M  +21   -18   kmymoney/views/keditscheduledlg.cpp

https://invent.kde.org/office/kmymoney/-/commit/5b5b55c9680523a846257f8849a583bd3bf5c22d
Comment 3 Thomas Baumgart 2025-12-16 10:34:52 UTC
Git commit 75716af34575880bbbf6d0dd58698a939ad3426b by Thomas Baumgart.
Committed on 16/12/2025 at 10:33.
Pushed by tbaumgart into branch '5.2'.

Keep the schedule type for loans

Using the new edit feature for scheduled loan transactions changed the
type of the schedule from loan-payment to bill. This resulted in the
automatic calculation of the values for interest and amortization not
being performed correctly in other areas of the application and
incorrect data being displayed.

The change also includes a correction of the data in case a non-loan
type schedule contains automatically calculated split values back to
type loan for erroneous records.
FIXED-IN: 5.2.2
(cherry picked from commit 5b5b55c9680523a846257f8849a583bd3bf5c22d)

M  +28   -2    kmymoney/mymoney/mymoneyfile.cpp
M  +1    -1    kmymoney/mymoney/mymoneyfile.h
M  +1    -1    kmymoney/plugins/sql/mymoneydbdef.cpp
M  +2    -2    kmymoney/plugins/sql/mymoneystoragesql.cpp
M  +51   -4    kmymoney/plugins/sql/mymoneystoragesql_p.h
M  +21   -18   kmymoney/views/keditscheduledlg.cpp

https://invent.kde.org/office/kmymoney/-/commit/75716af34575880bbbf6d0dd58698a939ad3426b