diff --git a/.gitignore b/.gitignore index 0a5a94b..c5e9862 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ gittoken.txt /bmad_output /.agents /.claude -/uploads \ No newline at end of file +/uploads +PSL Custom Proofs/* \ No newline at end of file diff --git a/App/Controllers/Kit/KitController.asp b/App/Controllers/Kit/KitController.asp index a8dc2cb..77d60b8 100644 --- a/App/Controllers/Kit/KitController.asp +++ b/App/Controllers/Kit/KitController.asp @@ -158,6 +158,11 @@ Class KitController Exit Sub End If + dim officeCopiesAmount : officeCopiesAmount = 0 + If IsNumeric(kitInfo.OfficeCopiesAmount) Then + officeCopiesAmount = CLng(kitInfo.OfficeCopiesAmount) + End If + dim appPath : appPath = Request.ServerVariables("APPL_PHYSICAL_PATH") dim labelsTemplatePath : labelsTemplatePath = appPath & "Data\Delivery_Labels.rep" dim packingSlipTemplatePath : packingSlipTemplatePath = appPath & "Data\Delivery_PackingSlip.rep" @@ -172,7 +177,7 @@ Class KitController Exit Sub End If - dim totalBoxes : totalBoxes = Int((inkjetCount + 1099) / 1100) + dim totalBoxes : totalBoxes = Int((inkjetCount + officeCopiesAmount + 1099) / 1000) If totalBoxes <= 0 Then Flash.AddError "Delivery paperwork cannot be generated because no shipping boxes were calculated." MVC.RedirectToActionExt "SwitchBoardPurpleEnvelopeEdit", Array("Id", kitId) diff --git a/Data/Proofs.rep b/Data/Proofs.rep index fcd9089..321d34a 100644 --- a/Data/Proofs.rep +++ b/Data/Proofs.rep @@ -122,7 +122,32 @@ object TRpReport item Alias = 'JURISDICTION' DatabaseAlias = 'WEBDATA' - SQL = 'SELECT * FROM JURISDICTION WHERE JCode =PBJCODE' + SQL = + 'SELECT'#13#10' q.JCode,'#13#10' CStr(q.[OrigName]) AS [Name],'#13#10#13#10' C' + + 'Str('#13#10' Left('#13#10' IIf('#13#10' InStr(1, ' + + 'q.OrigMailingAddress, "PO BOX", 1) > 0'#13#10' AND Len(' + + 'Trim(Left(q.OrigMailingAddress, InStr(1, q.OrigMailingAddress, "' + + 'PO BOX", 1) - 1))) > 0,'#13#10' Trim(Left(q.OrigMailing' + + 'Address, InStr(1, q.OrigMailingAddress, "PO BOX", 1) - 1)),'#13#10' ' + + ' q.OrigMailingAddress'#13#10' ),'#13#10' 2' + + '55'#13#10' )'#13#10' ) AS [Mailing_Address],'#13#10#13#10' CStr('#13#10' ' + + ' Left('#13#10' IIf('#13#10' InStr(1, q.OrigMailing' + + 'Address, "PO BOX", 1) > 0'#13#10' AND Len(Trim(Left(q.O' + + 'rigMailingAddress, InStr(1, q.OrigMailingAddress, "PO BOX", 1) -' + + ' 1))) > 0,'#13#10' Trim(Mid(q.OrigMailingAddress, InStr' + + '(1, q.OrigMailingAddress, "PO BOX", 1))),'#13#10' q.CSZ' + + #13#10' ),'#13#10' 255'#13#10' )'#13#10' ) AS [CSZ],'#13#10#13 + + #10' CStr('#13#10' Left('#13#10' IIf('#13#10' InS' + + 'tr(1, q.OrigMailingAddress, "PO BOX", 1) > 0'#13#10' AN' + + 'D Len(Trim(Left(q.OrigMailingAddress, InStr(1, q.OrigMailingAddr' + + 'ess, "PO BOX", 1) - 1))) > 0,'#13#10' q.CSZ,'#13#10' ' + + ' ""'#13#10' ),'#13#10' 255'#13#10' )'#13#10' ) AS ' + + '[Over_Flow],'#13#10#13#10' CStr(q.IMB) AS [IMB],'#13#10' CStr(q.IMB_Digits' + + ') AS [IMB_Digits]'#13#10#13#10'FROM'#13#10' ('#13#10' SELECT'#13#10' JC' + + 'ode,'#13#10' [Name] AS OrigName,'#13#10' Mailing_Addre' + + 'ss AS OrigMailingAddress,'#13#10' CSZ,'#13#10' IMB,'#13#10' ' + + ' IMB_Digits'#13#10' FROM Jurisdiction'#13#10' ) AS q'#13#10'WH' + + 'ERE'#13#10' JCode = PBJCODE;' end item Alias = 'CONTACTS' @@ -153,7 +178,7 @@ object TRpReport item Name = 'PBKITID' AllowNulls = False - Value = 208 + Value = 733 ParamType = rpParamInteger Datasets.Strings = ( 'KIT' @@ -170,7 +195,7 @@ object TRpReport item Name = 'PBJCODE' AllowNulls = False - Value = '34000' + Value = '81920' Datasets.Strings = ( 'JURISDICTION' 'CONTACTS') @@ -183,7 +208,7 @@ object TRpReport item Name = 'PBMIN' AllowNulls = False - Value = 346103 + Value = 2363859 ParamType = rpParamInteger Datasets.Strings = ( 'KITLABELS') @@ -196,7 +221,7 @@ object TRpReport item Name = 'PBMAX' AllowNulls = False - Value = 347342 + Value = 2364882 ParamType = rpParamInteger Datasets.Strings = ( 'KITLABELS') @@ -246,6 +271,9 @@ object TRpReport end item Component = TRpExpression19 + end + item + Component = TRpExpression23 end> ExternalTable = 'REPMAN_REPORTS' ExternalField = 'REPORT' @@ -1981,6 +2009,9 @@ object TRpReport end item Component = TRpImage0 + end + item + Component = TRpExpression24 end> ExternalTable = 'REPMAN_REPORTS' ExternalField = 'REPORT' @@ -7626,7 +7657,7 @@ object TRpReport PosX = 8055 PosY = 5865 Modul = 17 - Ratio = 3.00000000000000000 + Ratio = 3.000000000000000000 Typ = bcCode39 NumColumns = 1 NumRows = 1 @@ -7825,8 +7856,8 @@ object TRpReport object TRpExpression2: TRpExpression Width = 4200 Height = 264 - PosX = 7540 - PosY = 6090 + PosX = 7710 + PosY = 5890 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7847,8 +7878,8 @@ object TRpReport object TRpExpression3: TRpExpression Width = 4200 Height = 264 - PosX = 7540 - PosY = 6555 + PosX = 7710 + PosY = 6355 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7869,8 +7900,8 @@ object TRpReport object TRpExpression19: TRpExpression Width = 4200 Height = 264 - PosX = 7540 - PosY = 5840 + PosX = 7710 + PosY = 5640 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7891,8 +7922,8 @@ object TRpReport object TRpExpression1: TRpExpression Width = 4200 Height = 264 - PosX = 7540 - PosY = 6330 + PosX = 7710 + PosY = 6130 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7932,11 +7963,11 @@ object TRpReport AgIniValue = '0' ExportExpression = '' end - object TRpExpression20: TRpExpression + object TRpExpression21: TRpExpression Width = 4200 Height = 264 PosX = 8055 - PosY = 5080 + PosY = 4365 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7948,17 +7979,17 @@ object TRpReport DoAfterPrint = '' WFontName = 'Arial' LFontName = 'Helvetica' - Expression = 'JURISDICTION.CSZ' + Expression = 'CONTACTS.TITLE' DisplayFormat = '' ExportDisplayFormat = '' AgIniValue = '0' ExportExpression = '' end - object TRpExpression21: TRpExpression + object TRpExpression22: TRpExpression Width = 4200 Height = 264 PosX = 8055 - PosY = 4365 + PosY = 4855 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7970,17 +8001,54 @@ object TRpReport DoAfterPrint = '' WFontName = 'Arial' LFontName = 'Helvetica' - Expression = 'CONTACTS.TITLE' + Expression = 'JURISDICTION.Mailing_Address' DisplayFormat = '' ExportDisplayFormat = '' AgIniValue = '0' ExportExpression = '' end - object TRpExpression22: TRpExpression + object TRpImage0: TRpImage + Width = 4245 + Height = 240 + PosX = 8055 + PosY = 5616 + DrawStyle = rpDrawTiledpi + CachedImage = rpCachedVariable + PrintCondition = '' + DoBeforePrint = '' + DoAfterPrint = '' + Expression = + #39'\\kci1\inkjet\BMP\Purple_ballot_envelopes\'#39' + KITLABELS.ColorN' + + 'ame + '#39'.bmp'#39 + Stream = {0000000000000000} + end + object TRpExpression23: TRpExpression + Width = 4245 + Height = 270 + PosX = 7710 + PosY = 6604 + Type1Font = poHelvetica + AutoExpand = False + AutoContract = False + ExportPosition = 0 + ExportSize = 1 + ExportDoNewLine = False + PrintCondition = '' + DoBeforePrint = '' + DoAfterPrint = '' + WFontName = 'Arial' + LFontName = 'Helvetica' + Expression = 'JURISDICTION.Over_Flow' + DisplayFormat = '' + ExportDisplayFormat = '' + AgIniValue = '0' + ExportExpression = '' + end + object TRpExpression20: TRpExpression Width = 4200 Height = 264 PosX = 8055 - PosY = 4855 + PosY = 5080 Type1Font = poHelvetica AutoExpand = False AutoContract = False @@ -7992,25 +8060,32 @@ object TRpReport DoAfterPrint = '' WFontName = 'Arial' LFontName = 'Helvetica' - Expression = 'JURISDICTION.Mailing_Address' + Expression = 'JURISDICTION.CSZ' DisplayFormat = '' ExportDisplayFormat = '' AgIniValue = '0' ExportExpression = '' end - object TRpImage0: TRpImage - Width = 4245 - Height = 240 + object TRpExpression24: TRpExpression + Width = 4200 + Height = 264 PosX = 8055 - PosY = 5400 - DrawStyle = rpDrawTiledpi - CachedImage = rpCachedVariable + PosY = 5328 + Type1Font = poHelvetica + AutoExpand = False + AutoContract = False + ExportPosition = 0 + ExportSize = 1 + ExportDoNewLine = False PrintCondition = '' DoBeforePrint = '' DoAfterPrint = '' - Expression = - #39'\\kci1\inkjet\BMP\Purple_ballot_envelopes\'#39' + KITLABELS.ColorN' + - 'ame + '#39'.bmp'#39 - Stream = {0000000000000000} + WFontName = 'Arial' + LFontName = 'Helvetica' + Expression = 'JURISDICTION.Over_Flow' + DisplayFormat = '' + ExportDisplayFormat = '' + AgIniValue = '0' + ExportExpression = '' end end diff --git a/ImportService/TrackingDataImport.vbs b/ImportService/TrackingDataImport.vbs index 59aec44..8f01f5f 100644 Binary files a/ImportService/TrackingDataImport.vbs and b/ImportService/TrackingDataImport.vbs differ