Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency / Numeric
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00727690
Message ID:
00727829
Vues:
9
Hi Yiorgos,

If you place your table in a database container (e.g. DBC) you can specify an input mask and format for the currency field by selecting the modify table, which open up mini data dictionary. Then, if you open a browse window the table's currency field will conform to the format and input mask assigned.

Also, if you ever need to round the table's currency field to two decimal places, you could use something like:
select arcur
go top
Do WHILE !eof()
    IF amount<>ROUND(arcur.amount,2)
         replace arcur.amount WITH ROUND(arcur.amount,2) && round amount
    ENDIF
    SKIP
Enddo
In your code you will need to include the round function in any calculations where an amount might result in more than two decimal places, like where an accounting application is calculating sales tax or monthly interest charges on outstanding A/R like:

insert into arcur (cno,descript,amount) values (mcno,"A/R Interest Due",round(amount,2))

The currency type allows for huge monetary amounts, but only requires a width of 8 which I guess mean only requires 8 bytes.
Leland F. Jackson, CPA
Software - Master (TM)
smvfp@mail.smvfp.com
Software Master TM
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform