diff options
| author | levinse <levinse> | 2011-05-04 05:44:29 +0000 |
|---|---|---|
| committer | levinse <levinse> | 2011-05-04 05:44:29 +0000 |
| commit | 88f4b0463e6aadfb852be4330d049a210f6e1962 (patch) | |
| tree | b09252b9900bc109ed4ca46597881f1e7b5f29f5 /httemplate/search/cust_main.cgi | |
| parent | 59cd694a36481cd7445d7ad43c05854ee98f9059 (diff) | |
add USPS-unvalidated customer addresses report, RT12402
Diffstat (limited to 'httemplate/search/cust_main.cgi')
| -rwxr-xr-x | httemplate/search/cust_main.cgi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 8fbf6364c..ba7d4e368 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -83,6 +83,10 @@ % push @select, FS::TicketSystem->sql_num_customer_tickets. " as tickets"; % push @addl_headers, 'Tickets'; % push @addl_cols, 'tickets'; +% } elsif ( $query eq 'uspsunvalid' ) { +% $search{'country'} = 'US'; +% $sortby=\*custnum_sort; +% $orderby = "ORDER BY custnum"; % } else { % die "unknown browse field $query"; % } @@ -132,6 +136,10 @@ % $addl_qual .= ( $addl_qual ? ' AND ' : '' ). % $FS::CurrentUser::CurrentUser->agentnums_sql; % +% if ( $cgi->param('browse') && $cgi->param('browse') eq 'uspsunvalid' ) { +% $addl_qual .= ' AND ( length(zip) < 9 OR upper(address1) != address1 OR upper(city) != city ) '; +% } +% % if ( $addl_qual ) { % $qual .= ' AND ' if $qual; % $qual .= $addl_qual; |
