I am going to have to do formatting on form and reports. This is due to the
sales people only want to see two digits and the accounting/purchasing want
to see four digits. 
 
I guess that ten thousandth of a dollar is important...
 
Dan Goldberg

  _____  

From: [email protected] [mailto:[email protected]] On Behalf Of Bill Downall
Sent: Monday, June 01, 2009 11:15 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: changing currency subunit digits


Dan, 

For reasons James describes, especially the "global" setting -- where what
you do for CURRENCY anywhere affects what you get for CURRENCY everywhere --
I have used DOUBLE  or NUMERIC for storing money for a long time, using
formatting features of forms and reports to add dollar signs where
appropriate. The biggest problem with DOUBLE was accurately storing very
large values, like the national budget. And now in 8.0 and later, the BIGNUM
data type takes care of that very nicely.


Bill

On Mon, Jun 1, 2009 at 1:42 PM, James Bentley <[email protected]>
wrote:


Dan,

Currency is one area in RBase that poses a challenge for International
users.  Currency is a global setting for the database. In multi-currency
reporting you usually have multiple currency types: base currency,
functional currency, reporting currency, etc. 
Thus in a multi-currency accounting system for a given Account you may have
three or more currencies, with different digit and subdigit requirements
along with comman and period display differences. 

Thus while you would not have euro's, or yen, or dollars in the same column
you might need to have them all present in the same database. To the best of
my knowledge the SQL standards do not address currency in any manner similar
to the way NATIONAL CHARACTER data could be defined.

Any international users feel free to chip in on how you handle this problem.


 
Jim Bentley
American Celiac Society
[email protected]
tel: 1-504-737-3293 



  _____  

From: Dan Goldberg <[email protected]>
To: RBASE-L Mailing List <[email protected]>

Sent: Monday, June 1, 2009 12:05:07 PM
Subject: [RBASE-L] - Re: changing currency subunit digits


Thanks. I knew it had something to do with unloading/loading the database.
 
Dan Goldberg

  _____  

From: [email protected] [mailto:[email protected]] On Behalf Of James
Bentley
Sent: Monday, June 01, 2009 8:45 AM 

To: RBASE-L Mailing List

Subject: [RBASE-L] - Re: changing currency subunit digits


Dan,
To the best of my knowledge the only way to accomplish this is to unload the
database, edit the unload file to change the line
SET CURRENCY '$' PREF 2 B to a different value, you may have to also change
RBENGINE??.CFG file, rename original .RB? or .RX?, reload database.

Here is appropriate info from RSYNTAX.com
" 
CURRENCY 
        Top  Previous  Next     

Operating Condition 

Syntax: SET CURRENCY $ PREF 2 B 

SET CURRENCY sets the symbol, location, subunits, and format for currency
values. R:BASE stores the setting with the database. 

Changing the CURRENCY parameters affects all columns in the database that
have a CURRENCY data type. You must enter the parameters in the following
order: SYMBOL, PREF or SUFF, digits, and format; that is, even if you want
to change the digits only, you must also enter the symbol and its position. 


*        Symbol (default $)--A symbol is any ASCII character or string of
one to four characters. You can include a space in place of one character at
the beginning or end of the string, but if you do, enclose the string in
quotation marks.  
        

        
        


*        PREF and SUFF (default PREF)--Specify the position of the symbol as
before (PREF) or after (SUFF) the currency value. In the SET CURRENCY
command, enter a space between the symbol and its position, PREF or SUFF.  
        

        
        


*        Subunit digits (default 2)--Indicates the number of digits from 0
to 16 to be displayed in a currency subunit. In the case of dollars, the
subunit is cents, so the digits setting for dollars is 2. For example,
setting digits to 3 will display currency values similar to these:  
        

        
        


         
        

        20.000,000DM  
        

        20,000.000  
        

        2,000.000  
        

         
        

        
        


        If you change digits when the database contains data, the new digit
setting affects how R:BASE displays and uses the data already entered. For
example, if you change the setting from 2 to 4, an existing value such as
1,234.00 becomes 12.3400.  
        

        
        


*        Format (default B)--Format specifies how R:BASE displays the
thousands and decimal delimiters. A, B, and C specify how the thousands and
decimal delimiter displays for values with CURRENCY, REAL, and DOUBLE data
types. Before you change the format, you must change the DELIMIT character.

        

        
        


        Delimiter Conventions for CURRENCY, REAL, and DOUBLE Values  
        

        
        



Convention 

Thousands Delimiter 

Decimal Delimiter 

Example 


A 

. 

, 

123.456.793,01 


B 

, 

. 

123,456,793.01 


C 

(blank) 

, 

123 456 793,01 


D 

N/A 

. 

123456793.01 




         
        

        For example, to display currency in two digits with a prefix of DM
(deutsche marks) with the display format A, at the R> prompt, enter:  
        

         
        

        
        


        SET DELIMIT=!  
        

        SET CURRENCY DM PREF 2 A  
        

         
        

        
        


        This command displays 1,500 deutsche marks and 25 pfennigs in the
format like this:  
        

         
        

        
        


        DM 1.500,25.  
        

         
        

        
        


        If you set CURRENCY to the delimiter formats A or C without changing
DELIMIT to a character other than the comma--the default setting for
DELIMIT--R:BASE displays the following message:  
        

         
        

        
        


        Decimal character cannot be the same as DELIMIT  
        

        In this case, use SET DELIMIT to change the delimiter to a less
commonly used character such as an exclamation point; then set CURRENCY to
the delimiter formats A or C.  "
        

        
        
 
Jim Bentley
American Celiac Society
[email protected]
tel: 1-504-737-3293 



  _____  

From: Dan Goldberg <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Monday, June 1, 2009 9:59:37 AM
Subject: [RBASE-L] - changing currency subunit digits

I need to change the subunit digits from the normal two digits to four
digits.

The problem I have is when I change all my numbers shift over.

Example

10.99 is now .1099

How can I keep the decimal in the same place without having to multiple the
numbers in all the tables?


Dan Goldberg







Reply via email to