-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 22 Jul 2011 10:42:34 -0700 (PDT)
Rich Shepard <[email protected]> wrote:

>    If this is still the case, changing all those floats to (for example)
> numeric(8,2) will cover all of us with bank balances < 99,999,999.99 in our
> local currencies.

This is not a solution and I strongly advise against it.
Let me explain.

First, in Rich's case we don't have any information about the discrepancy 
amount. If it were a rounding issue the discrepancy can only be a few cents - 
more likely just 1 cent +/-.
Bigger discrepancy can't be explained this way.
It is more likely that the reason for his problems is repeated manual 
'adjustments'.

If you take a new L123 installation and replay all transactions what would the 
result be. Do we get the same problems or not? 

Secondly, using numeric(8,2) instead of floating point will not work for 
currencies without decimals. There are only a few but I happen to live in Japan 
and the Japanese Yen doesn't have decimals. Such a 'fix' would render L123 
useless for me. At best such a change would require multiple other changes to 
make if work for me.
In addition I'm not convinced that the database change will cure Rich's 
problems (and he writes that in fact it didn't).
If you work with multiple currencies and (relatively) high amounts a fixed 
format like numeric(8,2) can quickly lead to overflow errors, you get rounding 
mistakes and amounts over a DB defined max  amount won't show anymore.
A max of 10,000,000.00 is a lot in USD (and most other currencies) but only 
about 100,000 USD if the currency is Japanese Yen!

In any case, before considering such a change we should study the impact very 
carefully. Changing the field format in the DB is just a minor part of such a 
change. Program changes and the corresponding testing would require many days 
of coding and testing - and therefore this should only be considered after 
careful study.

Incidentally there is a rounding problem in L123 which affects foreign currency 
transactions if currencies with a different amount of decimals are involved 
(e.g. Japanese Yen and USD). While I corrected this it is unlikely that Rich's 
problems are caused by this bug.

Regards,
Bernd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk4qH38ACgkQpYU8M8PbPV7Z7gCePc1IlVFOjzJ5Nhiu3qketPpY
jhQAoLYIA7lTVRNf5ekum1ScsHwS3QbS
=gJKm
-----END PGP SIGNATURE-----
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger

Reply via email to