From: "seth ward" <[EMAIL PROTECTED]>
>
> But if I try to actually reduce the ordervalue by this amount,
> I hit problems
> <cfset discount=evaluate(getdiscount.FORMULA)>
> <cfset ordertotal=ordertotal-discount>
>
> This returns astronomical figures, sometimes even negative amounts.
>
You must be doing something besides what you describe.
I set up a test Access mdb as you describe and ran the
following script with appended results:
<cfquery name="q1" datasource="test1_mdb">
select formula
from formulas
where 0=0;
</cfquery>
<cfoutput query="q1">
formula: discount=#q1.formula[1]#<br>
</cfoutput>
<cfset ordertotal=2355.32>
<cfoutput>ordertotal: #ordertotal#<br></cfoutput>
<cfset discount=evaluate(q1.formula[1])>
<cfoutput>discount: #discount#<br></cfoutput>
<cfset ordertotal=ordertotal - discount>
<cfoutput>ordertotal=ordertotal - discount: #ordertotal#<br></cfoutput>
results
---------------------------
formula: discount=(numberformat((ordertotal - 1000)* 0.1))
ordertotal: 2355.32
discount: 136
ordertotal=ordertotal - discount: 2219.32
What else are you doing?
Pan
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.