Created attachment 128476 [details]
New Account Wizard - Schedule Page
"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.
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
The New Account Wizard should finish successfully and valid scheduled payment should be created.
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Please find attached screenshots presenting the issue.
Created attachment 128477 [details]
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
"Invalid payment type for schedule" was thrown when the user proceeded
through Credit Card Schedule Page leaving empty payment method
* sets default credit card payment method to "Direct debit",
* fixes incorrect Next button tooltip messages on the Schedule page.
Reviewed By: tbaumgart
Differential Revision: https://phabricator.kde.org/D29776
M +3 -5 kmymoney/wizards/newaccountwizard/kcreditcardschedulepage.cpp