Can you provide the code you're using to store those numbers?... if
the data type is correct, then maybe it's how it's breaking the number
down and storing it in the DB that needs some work.

On Nov 1, 2007 11:39 AM, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> Hi, all.
>
> I know that sounds simple and, as it's stated, it is.
>
> However, what I'm trying to accomplish turns out to be more
> complicated that I thought.
>
> I want to take a dollar amount, break it down by various percentages
> (that should total 100%), then place the dollar amounts into various
> accounts and have the total placed into those accounts equal the
> original amount that was broken down by the percentages.
>
> I've been trying every function I could find including decimal, round,
> various math equations, to achieve the goal, but it's not working.
>
> The data type in myself is decimal, set to 2 places, but invariably,
> if I take $100 and run it through the breakdown and place the amounts
> into the accounts, then add the dollar figures places into the accounts,
> the total comes back $97.00.  Not only that, but all dollar amounts ending
> up in the database are whole dollar amounts with not cents.
>
> Anybody have any clues how this should be approached?
>
> If the description above is not sufficient, I can give some concrete
> examples with actual numbers, but I figured someone had tackled
> something like this before.
>
> Thanks,
>
> Rick
>
> PS - I am on CF 8 now, so every solution is in play!  :o)
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292487
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to