Rounding Error with Taxes
Thomas Baumgart
thb at net-bembel.de
Mon Aug 7 15:55:06 UTC 2017
Hi Gee Backhouse,
On Montag, 7. August 2017 16:56:36 CEST you wrote:
> Thank you for taking the time to reply, I really appreciate it.
> I understand rounding methods but I don't understand why Kmymoney is fixed
> on rounding the numbers down in this scenario.
> Having entered the gross figure of 17.07 I don't mind whether Kmymoney
> chooses 14.23 + 2.84 or 14.22 + 2.85 since both options add up to 17.07.
> The problem I'm facing is that it chooses 14.22 + 2.84 giving a total of
> 17.06 which conflicts with the gross figure I entered - and it adds a
> yellow warning triangle to the transaction too!
Yes, understood. The problem stems from the internal calculation of the tax
part. It is always calculated by subtracting the net value from the gross
value. The problem is, that it does not adjust the net value to the rounded
one before doing the subtraction. This in fact leaves the tax part as 2.855 in
your example which is then rounded again.
It should round 14.225 to 14.22 and then doing the subtraction to 17.07-14.22
which results in 2.85 and everyone is happy. Hey, you found a bug! And a
rather old one: it lives there for more than 10 years now. Congrats.
I opened https://bugs.kde.org/show_bug.cgi?id=383239 and attached your
screenshot. Sorry for the spelling error in your name: I used the German
version of house :(
> I really want to use the functionality there because entering the figures
> manually takes too long and opens up too much room for error. However,
> there's a bug somewhere.
Yes, see above.
> As for the version, please see the attached.
We do have 4.8.0 out already (which still has your problem as it is also there
in the latest and greatest development version). Just in case you want to
update at some point in time.
> Many thanks again,
> Gee
--
Regards
Thomas Baumgart
https://www.telegram.org/ Telegram, the better WhatsApp
-------------------------------------------------------------
To mess up a Linux box, you need to work at it;
to mess up your Windows box, you just need to work on it.
Scott Granneman, Security Focus
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 846 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20170807/b29e3717/attachment.sig>
More information about the KMyMoney-devel
mailing list