Currency Format

This forum is for programmers who have questions about the source code.
Post Reply
fdscadmin
Posts: 59
Joined: Thu Aug 09, 2007 2:33 pm

Currency Format

Post by fdscadmin » Wed Aug 22, 2007 9:04 am

I thought I had this figured out, but.....

I have some currency claim form fields that need to be displayed without the decimal. I had thought that setting the FormatString to 0'00' was doing this until I realized that it was not including cents. Example:

340.25 is showing as 34000 when is should be 34025

I'm sure I'm overlooking something really simple, but I'm not seeing it. I'm also not super familiar with C#'s String formatting. Any suggestions?

Thanks

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Wed Aug 22, 2007 9:15 am

After more consideration, I think we would have to add another field name for a number without a decimal.
Jordan Sparks, DMD
http://www.opendental.com

fdscadmin
Posts: 59
Joined: Thu Aug 09, 2007 2:33 pm

One thought

Post by fdscadmin » Wed Aug 22, 2007 9:40 am

I know this is a little hackish, but we could just multiply the number by 100 right before we display it. We could enter "NoDec" as the FormatString and use it in an if-then or case to trigger the multiplication.

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Aug 23, 2007 7:26 pm

That sounds like a better solution to me.
Jordan Sparks, DMD
http://www.opendental.com

Post Reply