<% ' ********************************************************************** ' * ' * 633 04/25/2007 Add comaker empolyer information ' * ' * ' ********************************************************************** ' ***** Initialize Query ***** Dim ConnStr Dim Conn Dim rs Dim SQL Dim CaseID Dim ClientID Dim AgentID Dim StatusID Dim ContactID Dim AssignID Dim AcctNbr Dim Lname Dim Fname Dim Addr1 Dim Addr2 Dim City Dim State Dim Zip Dim Hphone Dim Wphone Dim Aphone Dim SSN Dim BirthDate Dim Year Dim Make Dim Model Dim Plate Dim PlateState Dim PlateExp Dim Color Dim VIN Dim KeyIgn Dim MapRef Dim EmpName Dim EmpAddr Dim EmpCity Dim EmpState Dim EmpZip Dim CoEmpName Dim CoEmpAddr Dim CoEmpCity Dim CoEmpState Dim CoEmpZip Dim AmtDue Dim DueDate Dim PymtAmt Dim Balance Dim AssignDate Dim ClientName Dim Lienholder Dim Desc1Addr Dim Desc2Addr Dim c Dim strEnteredBy Dim Status Dim Assignment Dim SpecInstr Dim strCollector Dim CollectorPhone Dim CoLName Dim CoFName Dim CoAddr1 Dim CoAddr2 Dim CoCity Dim CoState Dim CoZip Dim CoWphone Dim CoHphone Dim CoAphone Dim A1Addr1 Dim A1Addr2 Dim A1City Dim A1State Dim A1Zip Dim A2Addr1 Dim A2Addr2 Dim A2City Dim A2State Dim A2Zip Dim strErrorMsg Dim UserClass Dim UserType Dim Comment ' Company Information Dim CompName Dim CompAddr1 Dim CompCity Dim CompState Dim CompZip Dim CompPhone Dim CompFax Dim CompStateNbr Dim OvrHarmless Dim HarmlessText Dim RepoOrderContact ' On Error Resume Next strErrorMsg = "" CaseID = Request.QueryString("CaseID") CaseID = trim(CaseID) ' *************************************** ' Connect to Database ' *************************************** connectdb If Err.number <> 0 Then strErrorMsg = strErrorMsg & "305. Error Unable to connect to database.
" Err.Clear End If ' *************************************** ' Select Company Information ' *************************************** if strerrormsg = "" then SQL = "SELECT Name, " SQL = SQL & "Addr1, " SQL = SQL & "City, " SQL = SQL & "State, " SQL = SQL & "Zip, " SQL = SQL & "Phone, " SQL = SQL & "Fax, " SQL = SQL & "StateNbr, " SQL = SQL & "OvrHarmless, " SQL = SQL & "RepoOrderContact, " SQL = SQL & "HarmlessText " SQL = SQL & "FROM Company " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "Error Unable to read company information.
" Err.Clear End If end if if strerrormsg = "" then if Not rs.EOF then if NOT isnull(rs.fields("Name")) then CompName = rs.fields("Name") end if if NOT isnull(rs.fields("Addr1")) then CompAddr1 = rs.fields("Addr1") end if if NOT isnull(rs.fields("City")) then CompCity = rs.fields("City") end if if NOT isnull(rs.fields("State")) then CompState = rs.fields("State") end if if NOT isnull(rs.fields("Zip")) then CompZip = rs.fields("Zip") end if if NOT isnull(rs.fields("Phone")) then CompPhone = rs.fields("Phone") end if if NOT isnull(rs.fields("Fax")) then CompFax = rs.fields("Fax") end if if NOT isnull(rs.fields("StateNbr")) then CompStateNbr = rs.fields("StateNbr") end if if NOT isnull(rs.fields("OvrHarmless")) then OvrHarmless = rs.fields("OvrHarmless") end if if NOT isnull(rs.fields("RepoOrderContact")) then RepoOrderContact = rs.fields("RepoOrderContact") end if On Error Resume Next harmlesstext = rs.fields("HarmlessText") on error goto 0 end if rs.close set rs = nothing end if ' *************************************** ' Select Case Information ' *************************************** if strerrormsg = "" then SQL = "SELECT C.CaseID, " SQL = SQL & "C.Status, " SQL = SQL & "C.ContactID, " SQL = SQL & "C.AssignType, " SQL = SQL & "C.Agent, " SQL = SQL & "R1.Lname, " SQL = SQL & "R1.Fname, " SQL = SQL & "R1.Addr1, " SQL = SQL & "R1.Addr2, " SQL = SQL & "R1.City, " SQL = SQL & "R1.State, " SQL = SQL & "R1.Zip, " SQL = SQL & "R1.Hphone, " SQL = SQL & "R1.Wphone, " SQL = SQL & "R1.Aphone, " SQL = SQL & "C.SSN, " SQL = SQL & "C.Birthdate, " SQL = SQL & "C.Year, " SQL = SQL & "C.Make, " SQL = SQL & "C.Model, " SQL = SQL & "C.Plate, " SQL = SQL & "C.PlateState, " SQL = SQL & "C.PlateExp, " SQL = SQL & "C.Color, " SQL = SQL & "C.ClientAcct, " SQL = SQL & "C.VIN, " SQL = SQL & "C.KeyIgn, " SQL = SQL & "C.MapRef, " SQL = SQL & "C.EmpName, " SQL = SQL & "C.EmpAddr, " SQL = SQL & "C.EmpCity, " SQL = SQL & "C.EmpState, " SQL = SQL & "C.EmpZip, " SQL = SQL & "C.CoEmpName, " SQL = SQL & "C.CoEmpAddr, " SQL = SQL & "C.CoEmpCity, " SQL = SQL & "C.CoEmpState, " SQL = SQL & "C.CoEmpZip, " SQL = SQL & "C.AmtDue, " SQL = SQL & "C.DueDate, " SQL = SQL & "C.PymtAmt, " SQL = SQL & "C.Balance, " SQL = SQL & "C.AssignDate, " SQL = SQL & "C.SpecInstr, " SQL = SQL & "C.Lienholder, " SQL = SQL & "C.Desc1Addr, " SQL = SQL & "C.Desc2Addr, " SQL = SQL & "Cd1.CodeDesc as StatusDesc, " SQL = SQL & "Cd2.CodeDesc as AssignDesc, " SQL = SQL & "R3.Lname as ClientLname, " SQL = SQL & "R3.ID as ClientID " SQL = SQL & "FROM tCase C, Rdex R1, Rdex R3, Codes Cd1, Codes Cd2 " SQL = SQL & "Where CaseID = " & CaseID & " " SQL = SQL & "AND C.CaseID = R1.ID " SQL = SQL & "AND C.Status = Cd1.CodeID " SQL = SQL & "AND C.AssignType = Cd2.CodeID " SQL = SQL & "AND R1.MasterID = R3.ID " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "Error Unable to read assignment information.
" Err.Clear End If end if if strerrormsg = "" then if Not rs.EOF then StatusID = rs.fields("Status") ContactID = rs.fields("ContactID") AssignID = rs.fields("AssignType") AgentID= rs.fields("Agent") ClientID= rs.fields("ClientID") AcctNbr= rs.fields("ClientAcct") if isnull(rs.fields("Lname")) then Lname = " " else Lname= rs.fields("Lname") end if if isnull(rs.fields("Fname")) then Fname = " " else Fname= rs.fields("Fname") end if if isnull(rs.fields("Addr1")) then addr1 = " " else Addr1= rs.fields("Addr1") end if if isnull(rs.fields("Addr2")) then addr2 = "" else Addr2= rs.fields("Addr2") end if if isnull(rs.fields("City")) then City = " " else City= rs.fields("City") end if if isnull(rs.fields("State")) then State = " " else State= rs.fields("State") end if if isnull(rs.fields("Zip")) then Zip = " " else Zip= rs.fields("Zip") end if if isnull(rs.fields("Hphone")) then Hphone = " " else Hphone = rs.fields("Hphone") end if if isnull(rs.fields("Wphone")) then Wphone = " " else Wphone = rs.fields("Wphone") end if if isnull(rs.fields("Aphone")) then Aphone = " " else Aphone = rs.fields("Aphone") end if if isnull(rs.fields("SSN")) then SSN = " " else SSN= rs.fields("SSN") end if if isnull(rs.fields("BirthDate")) then BirthDate = " " else BirthDate = rs.fields("BirthDate") end if if isnull(rs.fields("Year")) then Year = " " else Year= rs.fields("Year") end if if isnull(rs.fields("Make")) then Make = " " else Make= rs.fields("Make") end if if isnull(rs.fields("Model")) then Model = " " else Model= rs.fields("Model") end if if isnull(rs.fields("Plate")) then Plate = " " else Plate= rs.fields("Plate") end if if isnull(rs.fields("PlateState")) then PlateState = "" else PlateState= rs.fields("PlateState") end if if isnull(rs.fields("PlateExp")) then PlateExp = "" else PlateExp = rs.fields("PlateExp") end if if isnull(rs.fields("Color")) then Color = " " else Color = rs.fields("Color") end if if isnull(rs.fields("VIN")) then VIN = " " else VIN= rs.fields("VIN") end if if isnull(rs.fields("KeyIgn")) then KeyIgn = " " else KeyIgn = rs.fields("KeyIgn") end if if isnull(rs.fields("MapRef")) then MapRef = " " else MapRef = rs.fields("MapRef") end if if isnull(rs.fields("EmpName")) then EmpName = " " else EmpName = rs.fields("EmpName") end if if isnull(rs.fields("EmpAddr")) then EmpAddr = " " else EmpAddr = rs.fields("EmpAddr") end if if isnull(rs.fields("EmpCity")) then EmpCity = " " else EmpCity = rs.fields("EmpCity") end if if isnull(rs.fields("EmpState")) then EmpState = " " else EmpState = rs.fields("EmpState") end if if isnull(rs.fields("EmpZip")) then EmpZip = " " else EmpZip = rs.fields("EmpZip") end if if isnull(rs.fields("CoEmpName")) then CoEmpName = " " else CoEmpName = rs.fields("CoEmpName") end if if isnull(rs.fields("CoEmpAddr")) then CoEmpAddr = " " else CoEmpAddr = rs.fields("CoEmpAddr") end if if isnull(rs.fields("CoEmpCity")) then CoEmpCity = " " else CoEmpCity = rs.fields("CoEmpCity") end if if isnull(rs.fields("CoEmpState")) then CoEmpState = " " else CoEmpState = rs.fields("CoEmpState") end if if isnull(rs.fields("CoEmpZip")) then CoEmpZip = " " else CoEmpZip = rs.fields("CoEmpZip") end if if isnull(rs.fields("AmtDue")) then AmtDue = 0 else AmtDue = rs.fields("AmtDue") end if if isnull(rs.fields("DueDate")) then DueDate = " " else DueDate = trim(rs.fields("DueDate")) end if if isnull(rs.fields("PymtAmt")) then PymtAmt = 0 else PymtAmt = rs.fields("PymtAmt") end if if isnull(rs.fields("Balance")) then Balance = 0 else Balance = rs.fields("Balance") end if if isnull(rs.fields("ClientLName")) then ClientName = " " else ClientName= rs.fields("ClientLName") end if if isnull(rs.fields("Lienholder")) then Lienholder = ClientName ClientName = "" else Lienholder = rs.fields("Lienholder") end if if isnull(rs.fields("Desc1Addr")) then Desc1Addr = " " else Desc1Addr = rs.fields("Desc1Addr") end if if isnull(rs.fields("Desc2Addr")) then Desc2Addr = " " else Desc2Addr = rs.fields("Desc2Addr") end if SpecInstr = rs.fields("SpecInstr") if len(SpecInstr) = 0 then SpecInstr = " " else ' specinstr = replace(specinstr,vbcrlf,"
") end if Status = rs.fields("StatusDesc") Assignment = rs.fields("AssignDesc") AssignDate = rs.fields("AssignDate") end if rs.close set rs = nothing end if ' *************************************** ' Select Agent Information ' *************************************** if strerrormsg = "" then strAgentName = "" if Session("UserType") = 3 then strAgentName = Session("FullName") else if AgentID > 0 then SQL = "SELECT " SQL = SQL & "R2.Lname as AgentLname, " SQL = SQL & "R2.Fname as AgentFname " SQL = SQL & "FROM Rdex R2 " SQL = SQL & "Where R2.ID = " & AgentID & " " SQL = SQL & "AND R2.type = '4' " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "306. Error Unable to read assignment information.
" Err.Clear End If if Not rs.EOF then strAgentName = rs.fields("AgentLname") if rs.fields("AgentFname") > "" then strAgentName = strAgentName & ", " & rs.fields("AgentFname") end if end if rs.close set rs = nothing end if end if end if ' *************************************** ' Select Collector Information ' *************************************** if strerrormsg = "" then if RepoOrderContact = "Y" then strCollector = "" if AgentID > 0 then SQL = "SELECT " SQL = SQL & "R2.Lname as CollectorLname, " SQL = SQL & "R2.Fname as CollectorFname, " SQL = SQL & "R2.Wphone as CollectorPhone " SQL = SQL & "FROM Rdex R2 " SQL = SQL & "Where R2.ID = " & ContactID & " " SQL = SQL & "AND R2.type = '2' " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "306. Error Unable to read collector information.
" Err.Clear End If if Not rs.EOF then strCollector = rs.fields("CollectorLname") if rs.fields("CollectorFname") > "" then strCollector = strCollector & ", " & rs.fields("CollectorFname") end if if rs.fields("CollectorPhone") > "" then CollectorPhone = rs.fields("CollectorPhone") end if end if rs.close set rs = nothing end if end if end if ' *************************************** ' Select Comaker Information ' *************************************** SQL = "SELECT " SQL = SQL & "Lname, " SQL = SQL & "Fname, " SQL = SQL & "Addr1, " SQL = SQL & "Addr2, " SQL = SQL & "City, " SQL = SQL & "State, " SQL = SQL & "Zip, " SQL = SQL & "Hphone, " SQL = SQL & "Aphone, " SQL = SQL & "Wphone " SQL = SQL & "FROM Rdex " SQL = SQL & "Where MasterID = " & CaseID & " " SQL = SQL & "AND Type = '5' " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "Error: Unable to read comaker information.
" Err.Clear End If if Not rs.EOF then if isnull(rs.fields("Lname")) then CoLname = " " else CoLname= rs.fields("Lname") end if if isnull(rs.fields("Fname")) then CoFname = " " else CoFname= rs.fields("Fname") end if if isnull(rs.fields("Addr1")) then CoAddr1 = " " else CoAddr1= rs.fields("Addr1") end if if isnull(rs.fields("Addr2")) then CoAddr2 = " " else CoAddr2 = rs.fields("Addr2") end if if isnull(rs.fields("City")) then CoCity = " " else CoCity = rs.fields("City") end if if isnull(rs.fields("State")) then CoState = " " else CoState = rs.fields("State") end if if isnull(rs.fields("Zip")) then CoZip = " " else CoZip = rs.fields("Zip") end if if isnull(rs.fields("Hphone")) then CoHphone = " " else CoHphone = rs.fields("Hphone") end if if isnull(rs.fields("Aphone")) then CoAphone = " " else CoAphone = rs.fields("Aphone") end if if isnull(rs.fields("Wphone")) then CoWphone = " " else CoWphone = rs.fields("Wphone") end if end if rs.close set rs = nothing ' *************************************** ' Select Address 1 Information ' *************************************** SQL = "SELECT " SQL = SQL & "Addr1, " SQL = SQL & "Addr2, " SQL = SQL & "City, " SQL = SQL & "State, " SQL = SQL & "Zip " SQL = SQL & "FROM Rdex " SQL = SQL & "Where MasterID = " & CaseID & " " SQL = SQL & "AND Type = '6' " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "Error: Unable to read address 1 information.
" Err.Clear End If if Not rs.EOF then if isnull(rs.fields("Addr1")) then A1Addr1 = " " else A1Addr1= rs.fields("Addr1") end if if isnull(rs.fields("Addr2")) then A1Addr2 = "" else A1Addr2 = rs.fields("Addr2") end if if isnull(rs.fields("City")) then A1City = " " else A1City = rs.fields("City") end if if isnull(rs.fields("State")) then A1State = " " else A1State = rs.fields("State") end if if isnull(rs.fields("Zip")) then A1Zip = " " else A1Zip = rs.fields("Zip") end if end if rs.close set rs = nothing ' *************************************** ' Select Address 2 Information ' *************************************** SQL = "SELECT " SQL = SQL & "Addr1, " SQL = SQL & "Addr2, " SQL = SQL & "City, " SQL = SQL & "State, " SQL = SQL & "Zip " SQL = SQL & "FROM Rdex " SQL = SQL & "Where MasterID = " & CaseID & " " SQL = SQL & "AND Type = '7' " ' ***** Run Query ***** Set rs = Conn.Execute(SQL) If Err.number <> 0 Then strErrorMsg = strErrorMsg & "Error: Unable to read address 2 information.
" Err.Clear End If if Not rs.EOF then if isnull(rs.fields("Addr1")) then A2Addr1 = " " else A2Addr1= rs.fields("Addr1") end if if isnull(rs.fields("Addr2")) then A2Addr2 = "" else A2Addr2 = rs.fields("Addr2") end if if isnull(rs.fields("City")) then A2City = " " else A2City = rs.fields("City") end if if isnull(rs.fields("State")) then A2State = " " else A2State = rs.fields("State") end if if isnull(rs.fields("Zip")) then A2Zip = " " else A2Zip = rs.fields("Zip") end if end if rs.close set rs = nothing ' *********************************************************************** ' ** Begin Html ' *********************************************************************** if strerrormsg = "" then %> Case: <%=Cstr(CaseID)%> <% '***************************************** ' ** Employer Info. ' **************************************** %> <% '***************************************** ' ** Comaker Employer ' **************************************** %> <% '***************************************** ' ** Address 1 Info. ' **************************************** %> <% '***************************************** ' ** Address 2 Info. ' **************************************** %> <% '***************************************** ' ** Lienholder Info ' **************************************** %> <% '***************************************** ' ** Assignment Info ' **************************************** %> <% '***************************************** ' ** Map Ref / Key Code ' **************************************** %> <% '***************************************** ' ** Special Instructions ' **************************************** 'if len(specinstr) > 1 then if specinstr > " " then %> <% end if %> <% '***************************************** ' ** Hold Harmless ' ****************************************%> <% end if %> <% '***************************************** ' ** Agent Update ' ****************************************%>
<%=lname%>, <%=fname%>
<%=Addr1%>
<% if addr2 > "" then %> <%=Addr2%>
<% end if %> <%=City%> <%=State%> <%=Zip%>
<%=Cstr(year)%>   <%=Make%>  <%=Model%>
Color: <%=color%>
VIN: <%=VIN%>
Plate: <%=Plate%> <% if PlateState > "" then %> -<%=PlateState%> <% end if %> <% if PlateExp > "" then %> (<%=PlateExp%>) <% end if %>

CONFIDENTIAL

Case <%=CaseID%>:  <%=Assignment%>
Assignment Date: <%=AssignDate%>

<%=CompName%>
<%=CompAddr1%>
<%=CompCity%>, <%=CompState%> <%=CompZip%>
Phone: <%=CompPhone%>
Fax: <%=CompFax%>
ID: <%=CompStateNbr%>

Order of Repossession/Foreclosure Document
Debtor:

<%=lname%>, <%=fname%>
<%=Addr1%>
<% if addr2 > "" then %> <%=Addr2%>
<% end if %> <%=City%> <%=State%> <%=Zip%>
Phone: <%=Hphone%>
<% if Aphone > " " then %> Alt#: <%=Aphone%>
<% end if %> DOB: <%=BirthDate%>

CoMaker:

<%=Colname%>, <%=Cofname%>
<%=CoAddr1%>
<%=CoAddr2%>
<%=CoCity%> <%=CoState%>  <%=CoZip%>
<% if coHphone > " " then %> Phone: <%=CoHphone%>
<% end if %> <% if coAphone > " " then %> Alt#: <%=CoAphone%>
<% end if %>

Employer <%=EmpName%>
<%=EmpAddr%>
<%=EmpCity%> <%=EmpState%> <%=EmpZip%>
<%=Wphone%>
Employer <%=CoEmpName%>
<%=CoEmpAddr%>
<%=CoEmpCity%> <%=CoEmpState%> <%=CoEmpZip%>
<% if coWphone > " " then %> <%=CoWphone%>
<% end if %>
Address1 <%=Desc1Addr%>
<%=A1Addr1%>
<% if A1addr2 > "" then %> <%=A1Addr2%>
<% end if %> <%=A1City%> <%=A1State%> <%=A1Zip%>
Address 2 <%=Desc2Addr%>
<%=A2Addr1%>
<% if A2addr2 > "" then %> <%=A2Addr2%>
<% end if %> <%=A2City%> <%=A2State%> <%=A2Zip%>
Lienholder <%=Lienholder%>

Client <%=ClientName%>
<% if RepoOrderContact = "Y" then %> <%=strCollector%>
<%=CollectorPhone%> <% end if %>
Account:
Balance
Amt Due
<% if DueDate > " " then %> Due Date
<% end if %> <% if PymtAmt > 0 then %> Monthly Pmt
<% end if %>
<%=AcctNbr%>
<%=Balance%>
<%=AmtDue%>
<% if DueDate > " " then %> <%=DueDate%>
<% end if %> <% if PymtAmt > 0 then %> <%=PymtAmt%>
<% end if %>
Assign To
<%=strAgentName%>

Map Ref
<%=MapRef%>
Key Code
<%=KeyIgn%>
Special Instructions
     <%=SpecInstr%>      

<% if OvrHarmless = "Y" then %> <%=HarmlessText%> <% else %> This is an authorization to collect or recover the above described assignment. We agree to pay the usual fees and expenses for these services performed. We agree to indemnify and save harmless from and against any and all claims, damages, losses and actions resulting from or arising out of our effortsto achieve the repossession of the above collateral, except, however, such as may arise out of negligence or unauthorized acts of your company.

Repo Date/Time Location
Police Dept Report Nbr/Officer
        Repossessed     Blocked     Not Seen     Other
Comments
 
<% ' *********************************************************************** ' ** End Html ' *********************************************************************** end if conn.close set conn = nothing if strErrorMsg > "" then ShowError(strErrorMsg) end if %>