Hi everybody.
I am working on an online ordering system for our emlpoyees to order company shirts and I was wondering if there was a way to do something I think would be very helpful to the users.
Each year an employee is given three company shirts, any shirt they order after that is charged to them via payroll deduction. The system I'm working on allows front desk users to enter orders for all employees at their location.
Since shirt orders can be placed for more than one employee at a time I would like to keep a count of how many employees are over their budget and what the amount deducted from payroll will be.
Here is what I have so far:
This code is part of a higher loop which moves through all cart rows (rsCart.MoveNext)
You can see how I am counting the number of employees over budget, I'm just not sure what to do with it after that and get it to display a list of those users.
Will I need to populate an array dynamically and call it later in the script?
If you guys have any ideas or need more info, let me know.
Thanks.
I am working on an online ordering system for our emlpoyees to order company shirts and I was wondering if there was a way to do something I think would be very helpful to the users.
Each year an employee is given three company shirts, any shirt they order after that is charged to them via payroll deduction. The system I'm working on allows front desk users to enter orders for all employees at their location.
Since shirt orders can be placed for more than one employee at a time I would like to keep a count of how many employees are over their budget and what the amount deducted from payroll will be.
Here is what I have so far:
Code:
if rsCart("ITEM_CAT_ID") = 1 then
payDeductAmnt = payDeductAmnt + rowCost
shirtCount = shirtCount + rowQty
end if
if rsCart("ITEM_CAT_ID") = 1 and rsCart("PREMPL") <> "" then
set rsShirtBdgt = Server.CreateObject("ADODB.Recordset")
strSQL2 = "SELECT * FROM MO_EMPL_SHIRT_BDGT WHERE PREMPL = '" & rsCart("PREMPL") & "';"
rsShirtBdgt.Open strSQL2, objConnMarketing
shirtCount = rsShirtBdgt("SHIRT_COUNT")
shirtBdgt = rsShirtBdgt("SHIRT_BDGT")
shirtCount = shirtCount + rowQty
if shirtCount > shirtBdgt then
overBudget = overBudget + 1
end if
rsShirtBdgt.Close
set rsShirtBdgt = nothing
end if
rsCart.MoveNext
orderTotal = orderTotal + rowCost
This code is part of a higher loop which moves through all cart rows (rsCart.MoveNext)
You can see how I am counting the number of employees over budget, I'm just not sure what to do with it after that and get it to display a list of those users.
Will I need to populate an array dynamically and call it later in the script?
If you guys have any ideas or need more info, let me know.
Thanks.