Bug 343348 - Edit of Loan changes 'type' of loan from 'lending' to 'borrowing' money
Summary: Edit of Loan changes 'type' of loan from 'lending' to 'borrowing' money
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.7.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2015-01-26 22:38 UTC by Jill Elaine
Modified: 2015-01-28 19:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.2
Sentry Crash Report:


Attachments
Initial Loan Set up results (82.43 KB, image/png)
2015-01-26 22:39 UTC, Jill Elaine
Details
Start of Edit Account (26.88 KB, image/png)
2015-01-26 22:40 UTC, Jill Elaine
Details
End of Edit Account (50.93 KB, image/png)
2015-01-26 22:41 UTC, Jill Elaine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jill Elaine 2015-01-26 22:38:23 UTC
After initial set up of "I am lending money" Loan type with the Loan Wizard, if I 'Edit Account' > 'Modify other loan information' > the edit shows only "To whom do you make payments?" (it should be "From whom do you receive payments") and the final result is that the Scheduled Transaction becomes a payment paid out (negative number) instead of a payment received (positive number).

Reproducible: Always

Steps to Reproduce:
1. Create Loan where "I am lending money"
2. Edit Account > Modify other loan information
3. Finish edit.
4. Look at Scheduled Transactions.

Actual Results:  
Loan is changed from "I am lending money" to "I am borrowing money".

Edit of loan always sets type to "I am borrowing money".

Expected Results:  
Loan should not be modified from "I am lending money" to "I am borrowing money" unless that is the desired result. Right now there is no choice to change this 'loan type': edit of loan always changes type to "I am borrowing money".
Comment 1 Jill Elaine 2015-01-26 22:39:36 UTC
Created attachment 90680 [details]
Initial Loan Set up results
Comment 2 Jill Elaine 2015-01-26 22:40:20 UTC
Created attachment 90681 [details]
Start of Edit Account
Comment 3 Jill Elaine 2015-01-26 22:41:07 UTC
Created attachment 90682 [details]
End of Edit Account

Notice type of loan is now "borrowed"
Comment 4 Cristian Oneț 2015-01-28 06:19:26 UTC
I can confirm this issue.
Comment 5 Cristian Oneț 2015-01-28 18:57:52 UTC
Git commit ee9415d83781269fa73afabd900638574c71e4c6 by Cristian Oneț.
Committed on 28/01/2015 at 18:46.
Pushed by conet into branch 'master'.

Fix any initial state of the loan editor represented by group buttons.

Use QAbstractButton::click instead of QAbstractButton::animateClick
to set the initial state of some values. This is needed because when
animateClick is used the value is only set after 100 ms thus possibly
overwriting any initial values set by KEditLoanWizard::loadWidgets
which is called immediately after creating the wizard pages (thus
before the click would actually occur).

This fixes the state of loan type ('lending' or 'borrowing') in the
wizard.

M  +1    -1    kmymoney/wizards/newloanwizard/editselectionwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/interestcalculationwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/interesttypewizardpage.cpp
M  +2    -2    kmymoney/wizards/newloanwizard/keditloanwizard.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/lendborrowwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/previouspaymentswizardpage.cpp
M  +2    -2    kmymoney/wizards/newloanwizard/recordpaymentwizardpage.cpp

http://commits.kde.org/kmymoney/ee9415d83781269fa73afabd900638574c71e4c6
Comment 6 Cristian Oneț 2015-01-28 18:58:52 UTC
Git commit 6752db06159df563731f83f76e7814aab9bfe889 by Cristian Oneț.
Committed on 28/01/2015 at 18:46.
Pushed by conet into branch '4.7'.

Fix any initial state of the loan editor represented by group buttons.

Use QAbstractButton::click instead of QAbstractButton::animateClick
to set the initial state of some values. This is needed because when
animateClick is used the value is only set after 100 ms thus possibly
overwriting any initial values set by KEditLoanWizard::loadWidgets
which is called immediately after creating the wizard pages (thus
before the click would actually occur).

This fixes the state of loan type ('lending' or 'borrowing') in the
wizard.
(cherry picked from commit ee9415d83781269fa73afabd900638574c71e4c6)

M  +1    -1    kmymoney/wizards/newloanwizard/editselectionwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/interestcalculationwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/interesttypewizardpage.cpp
M  +2    -2    kmymoney/wizards/newloanwizard/keditloanwizard.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/lendborrowwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/previouspaymentswizardpage.cpp
M  +2    -2    kmymoney/wizards/newloanwizard/recordpaymentwizardpage.cpp

http://commits.kde.org/kmymoney/6752db06159df563731f83f76e7814aab9bfe889
Comment 7 Cristian Oneț 2015-01-28 19:09:45 UTC
Git commit 515b2bc13dc16728b2669fab5c497659e3f3c545 by Cristian Oneț.
Committed on 28/01/2015 at 18:46.
Pushed by conet into branch 'frameworks'.

Fix any initial state of the loan editor represented by group buttons.

Use QAbstractButton::click instead of QAbstractButton::animateClick
to set the initial state of some values. This is needed because when
animateClick is used the value is only set after 100 ms thus possibly
overwriting any initial values set by KEditLoanWizard::loadWidgets
which is called immediately after creating the wizard pages (thus
before the click would actually occur).

This fixes the state of loan type ('lending' or 'borrowing') in the
wizard.

M  +1    -1    kmymoney/wizards/newloanwizard/editselectionwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/interestcalculationwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/interesttypewizardpage.cpp
M  +2    -2    kmymoney/wizards/newloanwizard/keditloanwizard.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/lendborrowwizardpage.cpp
M  +1    -1    kmymoney/wizards/newloanwizard/previouspaymentswizardpage.cpp
M  +2    -2    kmymoney/wizards/newloanwizard/recordpaymentwizardpage.cpp

http://commits.kde.org/kmymoney/515b2bc13dc16728b2669fab5c497659e3f3c545