From 12eecccdb5cc0b5e5f4f0122cade7e01f96d1de5 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Mar 2008 02:27:06 +0000 Subject: [PATCH] add ability to query ranges of duration & billable seconds to CDR report --- httemplate/search/cdr.html | 17 ++++++++++------- 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 @@
- +
+ <% 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', + ) + %> +
Status: @@ -30,6 +30,18 @@

-- 2.11.0