Odd arithmetic in ledger
Jack
ostroffjh at users.sourceforge.net
Tue Oct 1 00:15:36 BST 2019
On 2019.09.30 15:02, Thomas Baumgart wrote:
> Jack,
>
> On Freitag, 27. September 2019 18:54:31 CEST Jack wrote:
>
>> During my last reconciliation, I just couldn't get things to match
>> compeltely, and I finally found the problem. I have two deposit
>> transactions in a row, where the first one seems to add one cent too
>> much to the balance, and the next one adds one cent too little. If
>> the first of them wasn't the last transaction in the problem
>> reconciliation, I probably never would have noticed. These are in a
>> brokerage account: the first is an interest transaction, so there is
>> no rounding done at all. The second is a dividend transaction, so
>> there is also no rounding done. I'm attaching a screen shot, just
>> to show I'm not making this up (for a while, I thought I might be.)
>> Can anyone think of any possible reason for this behavior? All
>> accounts involved are in US dollars only, so there is not currency
>> conversion going on.
>
> Can you try to find the transactions in your XML file and figure out
> what is going on or send them to me via PM? Seems that they carry the
> information needed.
>
> > Thanks for any hints.
I just found a new example.
<TRANSACTION entrydate="2019-09-06" postdate="2019-09-30"
commodity="USD" id="T000000000000018825" memo="">
<SPLITS>
<SPLIT reconciledate="" reconcileflag="0" shares="-195/4"
price="1/1" payee="P000055" action="" value="-195/4" number=""
id="S0001" account="A000150" bankid="" memo=""/>
<SPLIT reconciledate="" reconcileflag="0" shares="195/4"
price="1/1" payee="P000055" action="" value="195/4" number=""
id="S0002" account="A000035" bankid="" memo=""/>
</SPLITS>
</TRANSACTION>
195/4 is $48.75, which is the amount of this transaction. The previous
transaction shows a balance of $0.00 and this one shows $48.74. This
transaction is for a check which has not yet been cashed.
So - I tried changing the amount by a few pennies up and down - and
always the balance was $.01 off what I expected. I then changed the
amount to $0.00 and the balance was a correct $0.00. I then changed
the amount back to $48.75, and the balance is now correctly $48.75.
The file now has:
<TRANSACTION entrydate="2019-09-06" postdate="2019-09-30"
commodity="USD" id="T000000000000018825" memo="">
<SPLITS>
<SPLIT reconciledate="" reconcileflag="0" shares="195/4"
price="1/1" payee="P000055" action="" value="195/4" number=""
id="S0001" account="A000150" bankid="" memo=""/>
<SPLIT reconciledate="" reconcileflag="0" shares="-195/4"
price="1/1" payee="P000055" action="" value="-195/4" number=""
id="S0002" account="A000035" bankid="" memo=""/>
</SPLITS>
</TRANSACTION>
which looks identical to me.
So - I went back to the original transaction. Making the amount one or
two cents above or below $11.71 leaves a correct balance, but $11.71
leaves a penny off. I changed the amount to $0.00 and the balance was
the same as the previous transaction. I changed the amount back to
$11.71, and the balance was again off by one cent.
Do I need to find someone to remove evil spirits from my house?
Jack
More information about the KMyMoney-devel
mailing list