<% Option Explicit If not Session("isLoggedIn") Then response.redirect("/ecommerce/default.asp?returnUrl=" & Server.URLEncode(Request.ServerVariables("SCRIPT_NAME"))) End If %> <% Dim strSortCat, intStatusID, intUserTypeID, intUserID, intWhichYear, i Dim strSQL, rsOrder, rsStatusList, strSortOrder Dim arrDBData, iOrder, iOrderFirst, iOrderLast Dim arrDBOrderData, iContainer, iContainerItemFirst, iContainerItemLast, intCurrentContainerCount Dim dblThisContainerTotal, dblTotalPrice intWhichYear = Year(Now) If Request.Form("whichYear") <> "" Then intWhichYear = CInt(Request.Form("whichYear")) strSQL = "EXEC stpOrderReport " & intWhichYear Set rsOrder = dbconn.Execute(strSQL) 'Set rsOrder = Server.CreateObject("ADODB.Recordset") 'rsOrder.CursorLocation = 3 'rsOrder.Open strSQL, dbconn, 3, 3 'rsOrder.Sort = strSortCat & " " & strSortOrder 'O.orderStatusID, OS.orderStatusDesc, O.recUserID, U.userName, ' O.supUserID, P.portDesc, O.shipInWeek, ' O.timeCreated, O.dateOnBoard, O.dateOfArrival, ' O.timeConfirmed, O.timeShipped, O.timeFulfilled, ' O.portID, O.orderTypeID, O.freightTypeID, ' OT.orderTypeDesc, O.orderCode arrDBData = null If rsOrder.EOF Then strErrMsg = "
  • no orders on which to report.
  • " isErr = true Else arrDBData = rsOrder.GetRows() iOrderFirst = LBound(arrDBData, 2) iOrderLast = UBound(arrDBData, 2) End If ' not EOF rsOrder.Close() Set rsOrder = Nothing %> Galuku Cocopeat

    Order Report

    <% If isErr Then %> <% End If %> <% If not isNull(arrDBData) Then Dim lastOrderID, strTrColor strTrColor = "#CCCC99" lastOrderID = 0 For iOrder = iOrderFirst to iOrderLast dblTotalPrice = 0 ' put empty row between orders %> <% ' O.OrderID, O.orderStatusID, OS.orderStatusDesc, ' O.recUserID, U.userName, O.supUserID, ' P.portDesc, O.shipInWeek, O.timeCreated, ' O.dateOnBoard, O.dateOfArrival, O.timeConfirmed, ' O.timeShipped, O.timeFulfilled, O.portID, ' O.orderTypeID, O.freightTypeID, OT.orderTypeDesc, ' O.orderCode If strTrColor = "#CCCCAA" Then strTrColor = "#CCCC99" Else strTrColor = "#CCCCAA" End If %> <% If arrDBData(1,iOrder) = ORDERSTATUS_CANCELLED Then ' order is cancelled %> <% Else %> <% End If %> <% Next End If ' isNull %>
    <%= strErrMsg %>
    View orders created in year
    Details Code Port Ship In Week Customer Date on Board Date of Arrival Date Received
    + <%= arrDBData(18,iOrder) %> <%= arrDBData(6,iOrder) %> <%= arrDBData(7,iOrder) %> <%= arrDBData(4,iOrder) %>cancelled<%= toBritishDate(arrDBData(9,iOrder),"/", "-") %> <%= toBritishDate(arrDBData(10,iOrder),"/", "-") %> <%= toBritishDate(arrDBData(13,iOrder),"/", "-") %>

    ^ back to top