Rob
Posts: 13
|
Posted: 07/27/2009, 12:38 PM |
|
Ok i have a shoppingcart in which i like to apply coupon a form coupon with 3 fields
member_id, sub_total and cpn
in the sql i have code
select member_id, sum(1.06*price) as sub_total from orders
group by member_id
1.06 because of state tax.
in before show i have
a = "50;25;15"
b = "10;5;3"
a = Split(a, ";")
b = Split(b, ";")
For i = 0 To UBound(a)
If round(fldsub_total,0) >= a(i) Then
fldcpn = b(i)
fldcpn=FormatCurrency(fldcpn,2)
Exit Sub
else
fldcpn = "0"
End If
Next
output for cpn field i get 0 regardless what the sub_total is. can someone help please
_________________
I don't even know enough to know that i don't know. |