diff options
| author | levinse <levinse> | 2011-05-04 05:44:27 +0000 |
|---|---|---|
| committer | levinse <levinse> | 2011-05-04 05:44:27 +0000 |
| commit | 3e01db10352a025538da91ec103b2c2ce562b11b (patch) | |
| tree | 071166d9deb7d7be4ebd98bd897add2234efe930 /httemplate/search | |
| parent | bb582ac8b4f2aee6dc4554a13acddcd8becfafe9 (diff) | |
add USPS-unvalidated customer addresses report, RT12402
Diffstat (limited to 'httemplate/search')
| -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; |
