Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency Data Types in accounting apps.
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00533246
Message ID:
00533798
Vues:
10
Hi!

I don't like currency data type because a lot of troubles related to conversion, rounding, data representation etc etc - things required to think. With numeric type there are less thing required to think about.

>Does anyone have any recommendation on whether it is better to use the currency data type, or stick with a numeric (9,2).
>
>The reasons against using currency is that when you mulitply a currency value with a very small number, such as 0.000493 (like a daily interest rate) you get a rounding error that is large enought to throw off calculations.
>
>It seems to me that useing a numeric with two decimals would make formatting an easy issue, and Fox automatically rounds a numeric when inserting into such a numeric field, so that if you do calculation such as the above and come up with 1.2359 as the amount, it gets rounded to 1.24 automagically.
>
>If anyone has any advice on the subject, I would appreicate it. This is for an accounting type application that needs to be as accurate as possible.
>
>Greg
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform