I'm trying to write a query which pulls shipment information
from an access database. Then it grabs the weight of each shipments
and multiplies it by the corresponding rate depending on its weight
class.
I'm using the CFIF, CFELSEIF and CFSET tags to try to
accopmlisht this, making it look something like this
<CFIF "Shipments.weight" LT 500 >
<cfset Shipments.rate = 7.5 >
<CFELSEIF "Shipments.weight" GT 499 LT 1000 >
<cfset Shipments.rate = 7 >
<CFELSEIF "Shipments.weight" GT 999 LT 2000 >
<cfset Shipments.rate = 6.5 >
<CFELSEIF "Shipments.weight" GT 1999 LT 5000 >
<cfset Shipments.rate = 5 >
<CFELSEIF "Shipments.weight" GT 4999 >
<cfset Shipments.rate = 3.65 >
</CFIF>
then in the Output tag I use this CFSCRIPT
<cfscript>
WriteOutput(#ACC_Report.weight#/100*#Shipments.rate#);
</cfscript>
It runs fine but it only seems to grab either the first or
the second set rate variables and multiplies all the weights in the
output query by it, inetead of logically choosing its weight class.
Any help, perhaps I'm using the wrong logic.
Thanks in advance