[Kmymoney-devel] Re: Investment Problem?

Jack Ostroff (D8 TC) ostroffjh at sbcglobal.net
Mon Jan 24 22:56:33 CET 2011


(sorry for the top post - new response back at the bottom)

On 2011.01.24 15:12, allan wrote:
> On 24/01/11 19:22, Jack wrote:
>> What was the balance before the import?
> 
> Hi Jack
> 
> When I'm testing, I use an empty-ish test file (just has accounts set  
> up, but empty) and just import into an empty account, so the prior  
> balance was zero.
> 
> It isn't just with imports. The same happens when I manually enter  
> transactions.  The first I enter shows with zero balance, a second  
> one added then gets zero balance, and the previous one gets a balance  
> just of the quantity from the second one.  Strangely, though, if I  
> use my production file, I can import as normal into existing  
> accounts.  However, if I set up a new file there, and enter  
> transactions, it fails.
> 
> I'm going to have to clear the sandbox and start from scratch. It  
> just doesn't make sense.
> 
> Allan
> 
>> 
>> On 2011.01.24 11:36, allan wrote:
>>> I hope this isn't me, but it is a bit weird.
>>> 
>>> I'd been importing some investment statements via the csv plugin  
>>> and noticed that a balance figure was incorrect, but the next and  
>>> following lines were OK.  As it coincided with an entry practically  
>>> identical to the one above, I just deleted it and all seemed OK.
>>> 
>>> Today, with a different file, I'm consistently getting incorrect  
>>> balances on imported investments.  Thinking I'd corrupted the  
>>> plugin code, I used it to make a qif file, examined it, and  
>>> imported that, still with the errors.  I tried an old qif file and  
>>> that too gave errors.
>>> 
>>> I've now updated from svn - same, and cleared build but still the  
>>> same.
>>> 
>>> There are three items.  The first is an add of 1545.61 shares,  
>>> against which the balance shows -52.53.  Then there is a reinv of  
>>> 29.31, with the balance now -23.22,  then  another of 23.22 shares  
>>> and the balance now at 0.00.
>>> 
>>>      Qty                  Balance
>>> 1545.61          -52.53
>>>      29.31          -23.22
>>>      23.22             0.00
>>> 
>>> So starting at the bottom, the 23.22 reinvested produce the balance  
>>> for the line above, the the previous reinv of 29.31 added, gives  
>>> the balance on the first line.  So, it looks like the balance is  
>>> calculated from the bottomor newest item, instead of from the top.

Definitely odd.  However, as balances (from my understanding) are  
calculated as the register is displayed (effectively - given caching  
for performance) might there be something funny with the display  
order.  Try changing the sort order of the register display in various  
ways to see if anything makes any more sense in a different order.   
Also - you could try changing the dates of the three transactions so  
they come in different orders.  Don't know if it will help, but it  
might provide some additional hint.


More information about the KMyMoney-devel mailing list