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

Thomas Baumgart thb at net-bembel.de
Sat May 7 18:52:44 CEST 2011


Hi,

on Saturday 07 May 2011 18:13:34 Martin Steigerwald wrote:

> Am Samstag, 7. Mai 2011 schrieb Thomas Baumgart:
> > Hi,
> 
> Hi Thomas and Marek,
> 
> > on Friday 06 May 2011 20:50:58 Marek wrote:
> > > 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.
> 
> [...]
> 
> > > Please consider for inclusion.
> > 
> > Done. Now in trunk. Thank you very much. I CC'ed the poster you refer
> > to as well.
> 
> Thanks. I opened a debian bug report about it that asks for inclusion of
> the patch.

Thanks.

> Is there some way to see those acc-ref's to judge whether I really have
> the same issue? It might take some time till I come around compiling
> kmymoney with this patch included.

Now that you are asking I took a look at my own data. This never worked :( 
Even I was affected by this bug and never noticed. For some reason it always 
worked for me.

One way to find out is to save the file as plain xml file and then do a bit of 
grep magic.

  grep acc-ref xxx.xml

should show you the values. To get the correct values into the field simply 
use KMyMoney and update the account as single update (don't use 'Update all 
accounts'). That will update the value automagically.


-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
If you pay peanuts, you'll get monkeys.
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110507/64f20c38/attachment.sig 


More information about the KMyMoney-devel mailing list