[kmymoney4] [Bug 345655] Rounding problems between checking and investment account

Thomas Baumgart via KDE Bugzilla bugzilla_noreply at kde.org
Sun Jul 24 14:54:44 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=345655

--- Comment #35 from Thomas Baumgart <tbaumgart at kde.org> ---
Here's some diagnostic instructions that you should run on your data file (I
assume it is a standard KMyMoney file).

We need to figure out the account id of the account in question. Here's how to
do that. First we uncompress the data and store that in its own file which we
use for further analysis.
% zcat xxx.kmy > xxx.xml
% grep '<ACCOUNT ' xxx.xml | grep 'Giro'

Replace xxx with your filename. Single quotes and spaces are important here. As
argument to grep use part of the name of your account. Here I get something
like the following line (you may see more entries - pick the one that is your
account):

  <ACCOUNT currency="EUR" description="" parentaccount="AStd::Asset"
opened="2016-01-01" number="111406" lastmodified="2016-07-24" type="1"
id="A000001" lastreconciled="2016-05-25" institution="I000001" name="1200 Giro
RaiBa">

The id in which we are interested of my example account is A000001. That is
what you need from your file.

Next we try to extract some data from your file. Depending on the order of the
attributes stored in the file, some arguments might be different for you.
Here's a line from my file so that you can check if they are identical:

% grep 'SPLIT ' xxx.xml | head -n 1
    <SPLIT payee="" reconcileflag="2" shares="64133/50"
reconciledate="2016-01-04" action="" bankid="" account="A000001" number=""
value="64133/50" memo="" id="S0001"/>

If the attributes for you are in the same order then things should work as
explained here. Otherwise you will have to play with the -f argument of the
first cut command. 

Replace the # signs after the A with the id determiined above. The argument for
the -d of the second cut command  single quote, double quote, single quote.  

% grep 'SPLIT ' xxx.xml | grep A###### | cut -d= -f4 | cut -d'"' -f2 | cut -d/
-f2 | sort | uniq

This should give a short list (mine as sample here):

1
10
100
2
20
25
4
5
50

These are the denominators of the shares which I am interested in. Next we need
the same for the online balances. That is a lot easier.

% grep lastStatementBalance xxx.xml | cut -d= -f 3 | cut -d/ -f2 | sort | uniq

Here is my output (don't worry about the trailing double quote here)

100"
2"
20"
25"
50"


Can you post your lists here? Once done, you can get rid of xxx.xml again.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list