Bug 402101

Summary: Allow to reuse check numbers
Product: [Applications] kmymoney Reporter: deanmalbert
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.3
Sentry Crash Report:

Description deanmalbert 2018-12-13 17:33:34 UTC
SUMMARY


STEPS TO REPRODUCE
1. I have been using the check number field on numerous accounts for debit transactions.  Every month I reuse the same numbers. You can't do that anymore.
2. A popup says" "check number xxx has been used in account YYY.  Do you want to replace it with the next available number? I click "No", and the number I put in is deleted.  This really screws up my entire system. 
3. Why have a popup that says "No or Yes" when the end result is the same?

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Jack 2018-12-13 19:18:18 UTC
I believe it is behaving as designed.  I don't remember when the restriction that numbers be unique within an account, but it likely based on checking accounts, where duplicate numbers generally cause problems.

When it asks if you want to use the next available number, the result is not the same no matter which reply you choose.  If you say "yes" it replaces what you entered with the new number.  If you say "no" it does not replace it, but does remove it, because it would be a duplicate, which is not allowed.

You might consider making this bug a wishlist, so that each account has a configuration setting whether or not to enforce unique numbers.
Comment 2 Thomas Baumgart 2019-01-26 07:16:14 UTC
Git commit b1fdee150af99db3134689efcb1ca3f5aff7daaa by Thomas Baumgart.
Committed on 26/01/2019 at 07:16.
Pushed by tbaumgart into branch '5.0'.

Fix check number handling

KMyMoney versions prior to 5.0 allowed to re-use check numbers. This is
not possible with the current 5.0 versions. This change will bring back
the original functionality.

In case KMyMoney detects a duplicate check number it informs the user.
The user then has the possibility to assign the next free number or
leave the number as entered. It will not be cleared in this case
anymore.
FIXED-IN: 5.0.3

M  +6    -4    kmymoney/dialogs/keditscheduledlg.cpp
M  +1    -7    kmymoney/dialogs/kenterscheduledlg.cpp
M  +1    -1    kmymoney/dialogs/stdtransactioneditor.cpp
M  +37   -49   kmymoney/dialogs/transactioneditor.cpp
M  +6    -5    kmymoney/dialogs/transactioneditor.h
M  +24   -48   kmymoney/kmymoneyutils.cpp
M  +9    -4    kmymoney/kmymoneyutils.h
M  +0    -1    kmymoney/views/kgloballedgerview.cpp
M  +7    -4    kmymoney/views/kgloballedgerview_p.h

https://commits.kde.org/kmymoney/b1fdee150af99db3134689efcb1ca3f5aff7daaa