<% ' ' Inventory Entry and Maintenance ' 'Initialize Standard Information Index = request("Index") ' The last selected Index number RowId = request("RowId") ' If a Row Id was passed RunReport = (request("RunReport")<>"") ' If run report was selected RunVendorReport = (request("RunVendorReport")<>"") ' If run report was selected %> <% ' redirects must occur before any html output! If RunReport then Response.redirect ("InvtList.asp?RunReport=1&Index=" & Index) end if If RunVendorReport then VendorRowid = Request("Vendor__RowId") Response.redirect ("InvtList.asp?RunReport=2&VendorRowID=" & VendorRowId) end if %> Inventory <% ' LoginRights: If 1 user has full rights, if 0 or -1, browse only rights %> <% LoginRights = request.cookies("Rights") %> " TYPE="text/css"> <% CheckFieldChange=oInvt.call("get_peFieldMultiUser") %> <% ' DebugMode =1 ' uncomment this for page get/post debug help %> <% If LoginRights = "1" then %>

Inventory Entry and Maintenance

<% else %>

Inventory Query

<% end if %> <% oInvt.call "set_pbReportErrors", 1 'normally show any errors that occur 'We either find a record, or clear the WBO If RowId <> "" Then Err = oInvt.RequestFindbyRowId( "Invt", RowId) else Err = oInvt.RequestClear("Invt",1) End if ' process various buttons that might have been pressed. ' only support Post submissions If request("Request_method")="POST" Then if Request("clear")<>"" then Err = oInvt.RequestClear("Invt",1) end if if Request("save")<>"" then oInvt.call "set_pbReportErrors", 0 err = oInvt.RequestSave("Invt") if err = 0 then Response.Write("

Invt record saved

") else Response.Write("") Response.Write("

Could not save changes. Errors Occurred

") oInvt.call "msg_ReportAllErrors" Response.Write("
") end if end if if Request("delete")<>"" then oInvt.call "set_pbReportErrors", 0 Err = oInvt.RequestDelete("Invt") if err = 0 then Response.Write("

The record has been deleted.

") else Response.Write("") Response.Write("

The record could not be deleted.

") oInvt.call "msg_ReportAllErrors" Response.Write("
") end if end if ' note we use the Index variable we created above if Request("findprev") <>"" then Err = oInvt.RequestFind("Invt", Index, LT) if Request("find") <>"" then Err = oInvt.RequestFind("Invt", Index, GE) if Request("findnext") <>"" then Err = oInvt.RequestFind("Invt", Index, GT) if Request("findfirst")<>"" then Err = oInvt.RequestFind("Invt", Index, FIRST_RECORD) if Request("findlast") <>"" then Err = oInvt.RequestFind("Invt", Index, LAST_RECORD) end if OldInvt = oInvt.ddvalue("Invt.RowId") %>
<% ' You MUST have a hidden rowid field for each DDO in your WBO %> " > <% ' This is needed if you need field level change state checking %>

Find by <% oInvt.call "get_CreateFindIndexCombo", "Index", "Invt", Index %> <% If LoginRights = "1" then %>    <% end if %>

<% ' We are using the parent combo form to select the vendor. ' When you use this, you do not need to create a hidden ' rowid field for Vendor. It is created here as ' Vendor__RowId %> <% If OldInvt<>"" then %> <% end if %> <%FieldError=oInvt.DDValue("Invt.Item_Id",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oInvt.DDValue("Invt.Description",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oInvt.DDValue("Invt.Vendor_Part_Id",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oInvt.DDValue("Invt.Unit_Price",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oInvt.DDValue("Invt.On_Hand",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %>
<%=oInvt.DDValue("Vendor.Name",DDLONGLABEL,1)%> <%=oInvt.DDValue("Vendor.Name",DDPARENTCOMBO)%>
Vendor <%=oInvt.DDValue("Vendor.Id")%> - <%=oInvt.DDValue("Vendor.Name")%>    <%=oInvt.DDValue("Vendor.Phone_Number") %>
<%=oInvt.DDValue("Invt.Item_Id",DDLONGLABEL,1)%> <%=oInvt.DDValue("Invt.Item_Id",DDFORM)%> <%=FieldError%>
<%=oInvt.DDValue("Invt.Description",DDLONGLABEL,1)%> <%=oInvt.DDValue("Invt.Description",DDFORM)%> <%=FieldError%>
<%=oInvt.DDValue("Invt.Vendor_Part_Id",DDLONGLABEL,1)%> <%=oInvt.DDValue("Invt.Vendor_Part_Id",DDFORM)%> <%=FieldError%>
<%=oInvt.DDValue("Invt.Unit_Price",DDLONGLABEL,1)%> <%=oInvt.DDValue("Invt.Unit_Price",DDFORM)%> <%=FieldError%>
<%=oInvt.DDValue("Invt.On_Hand",DDLONGLABEL,1)%> <%=oInvt.DDValue("Invt.On_Hand",DDFORM)%> <%=FieldError%>