projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e20fe41
)
add ability to query ranges of duration & billable seconds to CDR report
author
ivan
<ivan>
Wed, 26 Mar 2008 02:27:06 +0000
(
02:27
+0000)
committer
ivan
<ivan>
Wed, 26 Mar 2008 02:27:06 +0000
(
02:27
+0000)
httemplate/search/cdr.html
patch
|
blob
|
history
httemplate/search/report_cdr.html
patch
|
blob
|
history
diff --git
a/httemplate/search/cdr.html
b/httemplate/search/cdr.html
index
0facc7f
..
8079b5b
100644
(file)
--- a/
httemplate/search/cdr.html
+++ b/
httemplate/search/cdr.html
@@
-24,7
+24,6
@@
my $hashref = {};
# and fixup $count_query
my @search = ();
# and fixup $count_query
my @search = ();
-my @qsearch = ();
###
# freesidestatus
###
# 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);
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
###
###
# src/dest
###
+my @qsearch = @search;
+
if ( $cgi->param('src') =~ /^\s*([\d\-\+\ ]+)\s*$/ ) {
( my $src = $1 ) =~ s/\D//g;
$hashref->{'src'} = $src;
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
06f0b1a
..
1c19150
100644
(file)
--- a/
httemplate/search/report_cdr.html
+++ b/
httemplate/search/report_cdr.html
@@
-2,7
+2,7
@@
<FORM ACTION="cdr.html" METHOD="GET">
<FORM ACTION="cdr.html" METHOD="GET">
-<TABLE>
+<TABLE
BGCOLOR="#cccccc" CELLSPACING=0
>
<TR>
<TD ALIGN="right">Status: </TD>
<TD>
<TR>
<TD ALIGN="right">Status: </TD>
<TD>
@@
-30,6
+30,18
@@
</TD>
</TR>
</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>
</TABLE>
<BR>