I am kind of new to asp so not sure where to start.
So I have these:
<td align="right"><p>ยอดคงค้าง:</p></td>
<td align="left">
<p><%=intPreviousTotal%></p>
</td>
So intPrevious Total comes from this sql:
rsPreviousTotal.Open "SELECT Total.[sumofextended price] AS Total FROM tbl_ShipOrders INNER JOIN qrycondetailsextendedtotals AS Total ON Total.ship_ID = tbl_shipOrders.ship_order_ID WHERE chkloaded = yes AND Paid = 1 AND payment_id = 4 AND Deposited = No AND Branch_ID = " & branchID, oCOnn, 1, 3
after this:
do while not rsPreviousTotal.EOF
intPreviousTotal= intPreviousTotal + rsPreviousTotal(0)
rsPreviousTotal.MoveNext
loop
and the variables being declared and the initial value being set to zero just incase there is something stored in the cookies etc.
So it works fine but now I want to perform a calculation from these totals to draw the balance from it. Basically deducting all the deductables from the total.
Actually, I am looking for some advice on how I could go about doing it