I am working on an ordering system with no transaction. I have been able to develop the database and the ordering form and works fairly well. What the system does is:
A user logs into the site, places and order from our catalogue into an insert form with the option for inputing product code and quantity. I keep track of the order by Session information. Everytime a record is inserted a query multiplies unit price by quantity ordered and gives a line result or individual result. Another query adds all the line results into a subtotal, and I am trying to come up with a query that would calculate the taxes for the order.
There are 3 types of taxes depending on the province the user is from.
The query below works half way because it only calculates one time. What I want is to calculate for every order. I'm using Access/ASP and Ddreamweaver MX 2004. Please if anyone can help me would be great. I've been working on this for a week now and I don't seem to get anywhere.
rsSubGST__MMColParam = "0"
If (Session("MM_intUserID") <> "") Then
rsSubGST__MMColParam = Session("MM_intUserID")
Set rsSubGST = Server.CreateObject("ADODB.Recordset")
rsSubGST.ActiveConnection = MM_connStuff_STRING
rsSubGST.Source = "SELECT (intQuantity * catalogue_price * GST/100) AS GSTsub FROM tblOrders, Products, tblProvince WHERE prodID = product_code AND userID = " + Replace(rsSubGST__MMColParam, "'", "''") + ""
rsSubGST.CursorType = 0
rsSubGST.CursorLocation = 2
rsSubGST.LockType = 1
Thanks for the reply. That's what I though but it doesn't work. I have come to believe that I need to create some kind of function that instead of calculating the taxes for each entry, it will calculate the taxes for the subtotal. The problems is , I don't know how to create function using ASP. If anyone has a sample oe lead as to where to find one, it will be very much appreciated.