diff options
| author | ivan <ivan> | 2008-03-26 02:27:06 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2008-03-26 02:27:06 +0000 | 
| commit | 12eecccdb5cc0b5e5f4f0122cade7e01f96d1de5 (patch) | |
| tree | 151831a543e0676fabac21cbe9238dcf6d72d625 /httemplate | |
| parent | e20fe4173471fa7e80d3e0d66dd60eb01c581d1d (diff) | |
add ability to query ranges of duration & billable seconds to CDR report
Diffstat (limited to 'httemplate')
| -rw-r--r-- | httemplate/search/cdr.html | 17 | ||||
| -rw-r--r-- | httemplate/search/report_cdr.html | 14 | 
2 files changed, 23 insertions, 8 deletions
diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index 0facc7fab..8079b5b98 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -24,7 +24,6 @@ my $hashref = {};  # and fixup $count_query  my @search = (); -my @qsearch = ();  ###  # freesidestatus @@ -51,18 +50,22 @@ if ( $cgi->param('freesidestatus') eq 'NULL' ) {  my $str2time_sql = str2time_sql;  my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi); -push @search, -my @dsearch = ( "$str2time_sql calldate) >= $beginning ", -                "$str2time_sql calldate) <= $ending" -	      ); -push @search, @dsearch; -push @qsearch, @search; +push @search, "$str2time_sql calldate) >= $beginning ", +              "$str2time_sql calldate) <= $ending"; +### +# duration / billsec +### + +push @search, FS::UI::Web::parse_lt_gt($cgi, 'duration'); +push @search, FS::UI::Web::parse_lt_gt($cgi, 'billsec');  ###  # src/dest  ### +my @qsearch = @search; +  if ( $cgi->param('src') =~ /^\s*([\d\-\+\ ]+)\s*$/ ) {    ( my $src = $1 ) =~ s/\D//g;    $hashref->{'src'} = $src; diff --git a/httemplate/search/report_cdr.html b/httemplate/search/report_cdr.html index 06f0b1aae..1c191506f 100644 --- a/httemplate/search/report_cdr.html +++ b/httemplate/search/report_cdr.html @@ -2,7 +2,7 @@  <FORM ACTION="cdr.html" METHOD="GET"> -<TABLE> +<TABLE BGCOLOR="#cccccc" CELLSPACING=0>    <TR>      <TD ALIGN="right">Status: </TD>      <TD> @@ -30,6 +30,18 @@      </TD>    </TR> +  <% include( '/elements/tr-input-lessthan_greaterthan.html', +                'label' => 'Duration (sec)', +                'field' => 'duration', +            ) +  %> + +  <% include( '/elements/tr-input-lessthan_greaterthan.html', +                'label' => 'Billable duration (sec)', +                'field' => 'billsec', +            ) +  %> +  </TABLE>  <BR>  | 
