@@ -250,6 +250,8 @@ Function CreateProofForJurisdiction(KitID) | |||||
End Function | End Function | ||||
Function CreateExportForSnailWorks(KitID) | Function CreateExportForSnailWorks(KitID) | ||||
Dim State | |||||
Dim ForeignTest | |||||
If oConn.State = 0 Then:oConn.Open(ConnectionString):End If | If oConn.State = 0 Then:oConn.Open(ConnectionString):End If | ||||
Dim KitRs:set KitRs = oConn.Execute("Select * From [Kit] Where [ID] =" & KitID & ";") | Dim KitRs:set KitRs = oConn.Execute("Select * From [Kit] Where [ID] =" & KitID & ";") | ||||
Dim KitLabelsRs: Set KitLabelsRs = oConn.Execute("SELECT InkjetRecords.ID, InkjetRecords.KitID, InkjetRecords.VOTERID, InkjetRecords.LASTNAME," &_ | Dim KitLabelsRs: Set KitLabelsRs = oConn.Execute("SELECT InkjetRecords.ID, InkjetRecords.KitID, InkjetRecords.VOTERID, InkjetRecords.LASTNAME," &_ | ||||
@@ -302,38 +304,42 @@ Function CreateExportForSnailWorks(KitID) | |||||
.Write("""N""") 'INFOONLY | .Write("""N""") 'INFOONLY | ||||
.Write(vbCrLf) | .Write(vbCrLf) | ||||
While Not KitLabelsRs.EOF | While Not KitLabelsRs.EOF | ||||
.Write("""D"",") 'RecordType Required value must be = “D” (Detail) | |||||
.Write(Truncate("",20)) 'CustomerUniqueIdentifier Optional- any identifier you designate | |||||
.Write(Truncate(KitLabelsRs("OutboundIMBDigits"),31)) 'IMB Required – Unencoded, numeric IMB | |||||
.Write(Truncate("",10)) 'Greeting Optional | |||||
.Write(Truncate("",50)) 'First Name Optional | |||||
.Write(Truncate("",2)) 'MI Optional | |||||
.Write(Truncate("",50)) 'Last Name Optional | |||||
.Write(Truncate("",10)) 'Suffix Optional | |||||
.Write(Truncate((KitLabelsRs("CassADDRESS1").Value),100)) 'Full Name Optional | |||||
.Write(Truncate("",50)) 'Company Optional | |||||
.Write(Truncate("",50)) 'Title Optional | |||||
.Write(Truncate(KitLabelsRs("CassADDRESS3").Value,128)) 'Address1 Optional | |||||
.Write(Truncate(KitLabelsRs("CassADDRESS4").Value,128)) 'Address2 Optional | |||||
.Write(Truncate(Left(KitLabelsRs("CassADDRESS5").Value, _ | |||||
InStr(KitLabelsRs("CassADDRESS5").Value, ",") - 1),50)) 'City Optional | |||||
.Write(Truncate(Mid(KitLabelsRs("CassADDRESS5").Value, _ | |||||
InStr(KitLabelsRs("CassADDRESS5").Value, ",") + 2, 2),2)) 'State Optional | |||||
.Write Choice(InStr(KitLabelsRs("CassADDRESS5").Value,"-"),Truncate(Right(KitLabelsRs("CassADDRESS5").Value,11),11),Truncate(Right(KitLabelsRs("CassADDRESS5").Value,5),5)) 'Zip Optional | |||||
.Write(Truncate(KitRs("Jcode"),100)) 'UserDefined1 Optional - Summary fields only | |||||
.Write(Truncate("",100)) 'UserDefined2 Optional - Summary fields only | |||||
.Write(Truncate("",100)) 'UserDefined3 Optional - Summary fields only | |||||
.Write(Truncate(KitLabelsRs("PRECINCT").Value &_ | |||||
KitLabelsRs("BALLOT_NUMBER"),80)) 'UserDefinedIdentifier4 Optional – Allows for unique identifiers | |||||
.Write(Truncate(KitLabelsRs("VOTERID").Value,80)) 'UserDefinedIdentifier5 Optional – Allows for unique identifiers | |||||
.Write(Truncate("",1)) 'SeedIndicator Optional - if true provide ‘Y’ | |||||
.Write(Truncate("",80)) 'InductionPoint Optional | |||||
.Write(Truncate("",10)) 'InductionDate Optional – Valid date format, ex. MM/DD/YYYY | |||||
.Write(Truncate(Choice(IsNull(KitRs("InboundSTID")),"", _ | |||||
KitLabelsRs("InBoundIMBDigits").Value),31)) 'InboundIMB Optional – numeric IMB for Round trip jobs only | |||||
.Write(Truncate("",24)) 'IMCB Optional – Container Barcode | |||||
.Write("""""") 'IMTB Optional – Tray Barcode | |||||
.Write(vbCrLf) | |||||
ForeignTest = KitLabelsRs("CassADDRESS5").Value & KitLabelsRs("CassADDRESS4").Value | |||||
State = Truncate(Mid(KitLabelsRs("CassADDRESS5").Value, _ | |||||
InStr(KitLabelsRs("CassADDRESS5").Value, ",") + 2, 2),2) | |||||
If ((InStr(ForeignTest,"CANADA") = 0) And (InStr(ForeignTest,"AUSTRALIA") = 0)) And State <> " " Then | |||||
.Write("""D"",") 'RecordType Required value must be = “D” (Detail) | |||||
.Write(Truncate("",20)) 'CustomerUniqueIdentifier Optional- any identifier you designate | |||||
.Write(Truncate(KitLabelsRs("OutboundIMBDigits"),31)) 'IMB Required – Unencoded, numeric IMB | |||||
.Write(Truncate("",10)) 'Greeting Optional | |||||
.Write(Truncate("",50)) 'First Name Optional | |||||
.Write(Truncate("",2)) 'MI Optional | |||||
.Write(Truncate("",50)) 'Last Name Optional | |||||
.Write(Truncate("",10)) 'Suffix Optional | |||||
.Write(Truncate((KitLabelsRs("CassADDRESS1").Value),100)) 'Full Name Optional | |||||
.Write(Truncate("",50)) 'Company Optional | |||||
.Write(Truncate("",50)) 'Title Optional | |||||
.Write(Truncate(KitLabelsRs("CassADDRESS3").Value,128)) 'Address1 Optional | |||||
.Write(Truncate(KitLabelsRs("CassADDRESS4").Value,128)) 'Address2 Optional | |||||
.Write(Truncate(Left(KitLabelsRs("CassADDRESS5").Value, _ | |||||
InStr(KitLabelsRs("CassADDRESS5").Value, ",") - 1),50)) 'City Optional | |||||
.Write(State) 'State Optional | |||||
.Write Choice(InStr(KitLabelsRs("CassADDRESS5").Value,"-"),Truncate(Right(KitLabelsRs("CassADDRESS5").Value,11),11),Truncate(Right(KitLabelsRs("CassADDRESS5").Value,5),5)) 'Zip Optional | |||||
.Write(Truncate(KitRs("Jcode"),100)) 'UserDefined1 Optional - Summary fields only | |||||
.Write(Truncate("",100)) 'UserDefined2 Optional - Summary fields only | |||||
.Write(Truncate("",100)) 'UserDefined3 Optional - Summary fields only | |||||
.Write(Truncate(KitLabelsRs("PRECINCT").Value &_ | |||||
KitLabelsRs("BALLOT_NUMBER"),80)) 'UserDefinedIdentifier4 Optional – Allows for unique identifiers | |||||
.Write(Truncate(KitLabelsRs("VOTERID").Value,80)) 'UserDefinedIdentifier5 Optional – Allows for unique identifiers | |||||
.Write(Truncate("",1)) 'SeedIndicator Optional - if true provide ‘Y’ | |||||
.Write(Truncate("",80)) 'InductionPoint Optional | |||||
.Write(Truncate("",10)) 'InductionDate Optional – Valid date format, ex. MM/DD/YYYY | |||||
.Write(Truncate(Choice(IsNull(KitRs("InboundSTID")),"", _ | |||||
KitLabelsRs("InBoundIMBDigits").Value),31)) 'InboundIMB Optional – numeric IMB for Round trip jobs only | |||||
.Write(Truncate("",24)) 'IMCB Optional – Container Barcode | |||||
.Write("""""") 'IMTB Optional – Tray Barcode | |||||
.Write(vbCrLf) | |||||
End If | |||||
KitLabelsRs.MoveNext | KitLabelsRs.MoveNext | ||||
Wend | Wend | ||||
Powered by TurnKey Linux.