[Kmymoney-devel] [PATCH] KBanking plugin: stripLeadingZeroes() removes not only leading zeroes

Marek marek73 at directbox.com
Fri May 6 20:50:58 CEST 2011


Symptoms
------------
When updating accounts via AqHBCI entries from two or more accounts are merged into one account. The remaining accounts receive no updates.

A similar problem was reported on the kmymoney user list http://mail.kde.org/pipermail/kmymoney/2011-April/000253.html.

Versions affected
--------------------
4.5.3 and probably others

Description
--------------
in kmymoney/plugins/kbanking/mymoneybanking.cpp stripLeadingZeroes() is used to remove leading zeros from bank routing and account numbers. The resulting values are used to generate kbanking-acc-ref. In addition to the leading zeroes the function incorrectly removes also any digits after significant zeros. This can lead to a situation where kbanking-acc-ref's of different accounts are not unique, e.g. both stripLeadingZeroes(1205) and stripLeadingZeroes(1204) yield 12. 

Consequently, when updating such accounts via AqHBCI updates from all accounts with the same kbanking-acc-ref are merged into one account.

Testing
---------
The enclosed patch against the 4.5.3 release works for me in my daily usage (in fact it makes using kmymoney with my bank accounts with HBCI possible at all) but has not been otherwise tested.



Please consider for inclusion.

Thanks for kmymoney. It is a great piece of software!

Best Regards,
Marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmymoney-kbanking.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110506/7bd810c9/attachment-0001.patch 


More information about the KMyMoney-devel mailing list