diff options
author | levinse <levinse> | 2010-11-09 02:51:50 +0000 |
---|---|---|
committer | levinse <levinse> | 2010-11-09 02:51:50 +0000 |
commit | 9ab5259d95fafee083cd377b03f4ffdc37bd137a (patch) | |
tree | 61e2f4ecc6fc12b477054750d80e8aae91a09dfc /httemplate/search/phone_avail.html | |
parent | fcc78605ae0605fbe1e4d7fca4c0df80c1fda6f2 (diff) |
add phone number search report, RT10464
Diffstat (limited to 'httemplate/search/phone_avail.html')
-rw-r--r-- | httemplate/search/phone_avail.html | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/httemplate/search/phone_avail.html b/httemplate/search/phone_avail.html index 2388d25ff..2ef3dcd8c 100644 --- a/httemplate/search/phone_avail.html +++ b/httemplate/search/phone_avail.html @@ -16,6 +16,8 @@ 'header' => [ '#', 'State', 'Phone Number', + 'Rate Center', + 'Batch', 'Export', 'Service', FS::UI::Web::cust_header(), @@ -27,15 +29,19 @@ '+'. $pn->countrycode. ' '. $pn->npa. ' '. $pn->nxx. '-'. $pn->station; }, + 'name', + 'availbatch', 'exportnum', #XXX #sub { }, 'svcnum', #XXX \&FS::UI::Web::cust_fields, ], - 'align' => 'rllll'.FS::UI::Web::cust_aligns(), + 'align' => 'rllllll'.FS::UI::Web::cust_aligns(), 'links' => [ '', '', + '', + '', '', '', #XXX #$export_link '', #XXX #$svc_link @@ -46,6 +52,8 @@ 'color' => [ '', '', + '', + '', '', '', '', @@ -54,6 +62,8 @@ 'style' => [ '', '', + '', + '', '', '', '', @@ -68,9 +78,28 @@ die "access denied" my @search = (); -if ( $cgi->param('availbatch') =~ /^([\w\/\:\-\.]+)$/ ) { - push @search, "availbatch = '$1'"; -} +push @search, "availbatch = '$1'" + if ( $cgi->param('availbatch') =~ /^([\w\d \/\:\-\.]+)$/ ); + +push @search, "countrycode = '$1'" + if ( $cgi->param('countrycode') =~ /^(\d{1,3})$/ ); + +push @search, "phone_avail.state = '$1'" + if ( $cgi->param('state') =~ /^(\w{2})$/ ); + +# i know that the regexps match more than NPA/NXX, but this is good enough now +push @search, "npa = '$1'" + if ( $cgi->param('npa') =~ /^(\d{3})$/ ); +push @search, "nxx = '$1'" + if ( $cgi->param('npa') =~ /^\d{3}$/ && $cgi->param('nxx') =~ /^(\d{3})$/ ); + +push @search, "name = '$1'" + if ( $cgi->param('ratecenter') =~ /^([\w \-\.]+)$/ ); + +push @search, "svcnum is null" + if ( $cgi->param('avail_status') eq 'AVAIL' ); +push @search, "svcnum is not null" + if ( $cgi->param('avail_status') eq 'UNAVAIL' ); # #here is the agent virtualization # push @search, $FS::CurrentUser::CurrentUser->agentnums_sql; |