Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
sjhf #1
negative calculations
Not sure if this is within CF or MySQL, but I have a item with I want to
multiply quantity by a negative dollar value. The number and amount are both
prepopulated from a MySQL database. It seems to not calculate the negative
number and resets it to 0 on the display page after the calculation is done.
The database save the quantity as a negative ok, but not the dollar value.
Any advice?
sjhf Guest
-
Calculations in datagrid
Hi Aparna, It would be helpful if u provide some sample code. regards, kchalla "aparna reddy via .NET 247" wrote: -
PDF Forms - Calculations
I'm trying to develop a PDF form that serves as a timecard. I want to be able to subtract a time formatted text field in order to get a total hours... -
Calculations with date
Hello all, I am looking for an advice or suggestion in this task: I do have a Perl script which contains 2 variables ($low, $high). The value... -
Doing time calculations...
Howdy, For a project I am working on right now I need to be able to calculate the time difference between to given times. (For example...The... -
calculations and tables
I'm relatively new to Access, and I'm in the process of creating a few simple databases to manage our inventory. This database is going to involve... -
sjhf #2
negative calculations
Not sure if this is within CF or MySQL, but I have a item with I want to
multiply quantity by a negative dollar value. The number and amount are both
prepopulated from a MySQL database. It seems to not calculate the negative
number and resets it to 0 on the display page after the calculation is done.
The database save the quantity as a negative ok, but not the dollar value.
Any advice?
sjhf Guest
-
SafariTECH #3
Re: negative calculations
a negative should be possible if a negative is actually coming from the DB data
try outputting the initial data to see what it shows, or even look in the data
tables themseleves to see if the field is allowing negative values.
are you sure the output isn't just showing up as ($23.99) - brackets do
indicate negative values.
SafariTECH Guest
-
sjhf #4
Re: negative calculations
Yep. I checked the database and it was. I was wondering if there was anything
special to do with DollarFormat. It's at the point it tries to calculate that
it calculates at 0. All positive number calculations are fine.
sjhf Guest
-
SafariTECH #5
Re: negative calculations
What do you see if you simply use #ExtraTotal# instead of DollarFormatting it?
does it show a negative decimal number?
If you use #DollarFormat("-23.99")# you should get (23.99) which is negative.
Therefore outputing the variable in dollarformat should do the same.
SafariTECH Guest



Reply With Quote

