Bug 459881 - edit loan wizard does not take empty value for principal and interest
Summary: edit loan wizard does not take empty value for principal and interest
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.3
Platform: Other FreeBSD
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-01 10:59 UTC by Andriy Gapon
Modified: 2023-11-18 22:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.4


Attachments
screenshot of the principal and interest step (39.79 KB, image/png)
2022-10-01 10:59 UTC, Andriy Gapon
Details
the error box (17.93 KB, image/png)
2022-10-01 10:59 UTC, Andriy Gapon
Details
repro step 1 (50.34 KB, image/png)
2023-08-02 14:48 UTC, Andriy Gapon
Details
repro step 2 (45.14 KB, image/png)
2023-08-02 14:49 UTC, Andriy Gapon
Details
repro step 3 (42.03 KB, image/png)
2023-08-02 14:49 UTC, Andriy Gapon
Details
repro step 4 (56.72 KB, image/png)
2023-08-02 14:50 UTC, Andriy Gapon
Details
repro step 5 (51.93 KB, image/png)
2023-08-02 14:50 UTC, Andriy Gapon
Details
repro step 6 (39.27 KB, image/png)
2023-08-02 14:50 UTC, Andriy Gapon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Gapon 2022-10-01 10:59:11 UTC
Created attachment 152531 [details]
screenshot of the principal and interest step

SUMMARY
Trying to change interest rate on a load account and can't "leave empty" Principal and interest field at the corresponding step of the wizard. If I leave the field empty it magically becomes 0.00. When I enter the new interest rate at the next step I cannot go past it because the Wizard complain that the values do not match and I should leave one of them empty.


STEPS TO REPRODUCE
1. Launch Edit loan wizard and select Modify the interest rate option
2. Select variable rate, etc
3. Try to leave Principal and interest value empty
4. Enter new interest value

OBSERVED RESULT
Wizard complains about mismatching values.

EXPECTED RESULT
Wizard should accept the new interest rate and calculate other parameters based on it.

SOFTWARE/OS VERSIONS
KDE Frameworks Version 5.98.0
Qt Version 5.15.5 (built against 5.15.5)
The xcb windowing system

ADDITIONAL INFORMATION
Comment 1 Andriy Gapon 2022-10-01 10:59:56 UTC
Created attachment 152532 [details]
the error box
Comment 2 Thomas Baumgart 2023-01-28 07:25:12 UTC
Git commit b5799bc901ea24d5e0ecb8df60e5dea50966f972 by Thomas Baumgart.
Committed on 28/01/2023 at 07:24.
Pushed by tbaumgart into branch '5.1'.

Allow empty fields for calculation

(cherry picked from commit 3ee4f7de1e288c49e26ce6fad00ae3e915b22f9d)
FIXED-IN: 5.1.4

M  +2    -0    kmymoney/wizards/newloanwizard/finalpaymentwizardpage.cpp
M  +2    -0    kmymoney/wizards/newloanwizard/interesteditwizardpage.cpp
M  +2    -0    kmymoney/wizards/newloanwizard/paymenteditwizardpage.cpp
M  +2    -0    kmymoney/wizards/newloanwizard/paymentwizardpage.cpp

https://invent.kde.org/office/kmymoney/commit/b5799bc901ea24d5e0ecb8df60e5dea50966f972
Comment 3 Andriy Gapon 2023-08-02 14:48:56 UTC
Created attachment 160681 [details]
repro step 1
Comment 4 Andriy Gapon 2023-08-02 14:49:16 UTC
Created attachment 160682 [details]
repro step 2
Comment 5 Andriy Gapon 2023-08-02 14:49:41 UTC
Created attachment 160683 [details]
repro step 3
Comment 6 Andriy Gapon 2023-08-02 14:50:04 UTC
Created attachment 160684 [details]
repro step 4
Comment 7 Andriy Gapon 2023-08-02 14:50:23 UTC
Created attachment 160685 [details]
repro step 5
Comment 8 Andriy Gapon 2023-08-02 14:50:38 UTC
Created attachment 160686 [details]
repro step 6
Comment 9 Andriy Gapon 2023-08-02 14:55:31 UTC
I am afraid that the change (as applied to 5.1 branch) has not fully fixed the issue for me.
It does allow to leave the fields as empty and that fixes the original problem.
But even if I leave one of the fields empty the wizard produces an error saying that I entered inconsistent values.
Please see attached repro step 1 -6 images.

It's possible that I am doing something wrong or that my earlier experiments created some sort of an edge case in the database (e.g., the current interest rate of zero).
Could you please review this report?
Comment 10 Jack 2023-08-02 14:58:11 UTC
Please specify exactly which version you are using to test, to be sure that version does include the fix.
Comment 11 Andriy Gapon 2023-08-02 15:00:10 UTC
(In reply to Jack from comment #10)
> Please specify exactly which version you are using to test, to be sure that
> version does include the fix.

This is branch 5.1 updated today in a Git repo cloned from https://invent.kde.org/office/kmymoney.git
Comment 12 Andriy Gapon 2023-08-02 15:01:43 UTC
The branch is at commit 581d3ef3940828479eb6a71cfd981760950b8839
Comment 13 Jack 2023-11-18 22:52:55 UTC
I just (re)found this bug - did you mean to reopen it?  You added screenshots but did not change the state.