Bug 421569

Summary: New Account Wizard throws exception on empty payment method selected
Product: [Applications] kmymoney Reporter: Robert Szczesiak <dev.rszczesiak>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: me
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.0
Attachments: New Account Wizard - Schedule Page
Error Message

Description Robert Szczesiak 2020-05-15 14:22:59 UTC
Created attachment 128476 [details]
New Account Wizard - Schedule Page

SUMMARY
"Invalid payment type for schedule" is thrown when the user proceeds through Credit Card Schedule Page leaving empty payment method (default).

STEPS TO REPRODUCE
1. Go to the Accounts view and click the "New Account..." button.
2. Follow the instructions in the Wizard. From the Account type dropdown list select "Credit Card".
3. On the Schedule page leave Payment method empty.
4. On the last page click the "Finish" button.

OBSERVED RESULT
Upon finishing the Wizard, an error window pops up:
Unable to create account: Invalid payment type for schedule /home/robert/repos/phabricator/kmymoney/kmymoney/mymoney/mymoneyschedule.cpp:396

EXPECTED RESULT
The New Account Wizard should finish successfully and valid scheduled payment should be created.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Please find attached screenshots presenting the issue.
Comment 1 Robert Szczesiak 2020-05-15 14:23:45 UTC
Created attachment 128477 [details]
Error Message
Comment 2 Thomas Baumgart 2020-05-17 08:32:52 UTC
Git commit c66fbc048b73037c19aede29ee56b8c564c9b3ac by Thomas Baumgart, on behalf of Robert Szczesiak.
Committed on 16/05/2020 at 07:07.
Pushed by tbaumgart into branch '5.0'.

Fix New Account Wizard throws exception on empty payment method selected

Summary:
"Invalid payment type for schedule" was thrown when the user proceeded
through Credit Card Schedule Page leaving empty payment method
(default).

This commit:
* sets default credit card payment method to "Direct debit",
* fixes incorrect Next button tooltip messages on the Schedule page.
FIXED-IN: 5.0.9

Reviewers: tbaumgart

Reviewed By: tbaumgart

Subscribers: ostroffjh

Tags: #kmymoney

Differential Revision: https://phabricator.kde.org/D29776

M  +3    -5    kmymoney/wizards/newaccountwizard/kcreditcardschedulepage.cpp

https://invent.kde.org/office/kmymoney/commit/c66fbc048b73037c19aede29ee56b8c564c9b3ac