[freeside-commits] freeside/httemplate/search report_cdr.html, 1.1,
1.2 cdr.html, 1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Mon Mar 20 11:13:29 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail:/tmp/cvs-serv20016/httemplate/search
Modified Files:
report_cdr.html cdr.html
Log Message:
add price plan to bill on internal or external CDRs directly, add option to export CDRs to a per-customer downstream file
Index: report_cdr.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_cdr.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- report_cdr.html 18 Feb 2006 11:14:20 -0000 1.1
+++ report_cdr.html 20 Mar 2006 19:13:27 -0000 1.2
@@ -1,6 +1,11 @@
<%= include('/elements/header.html', 'Call Detail Record Search' ) %>
<FORM ACTION="cdr.html" METHOD="GET">
+Status: <SELECT NAME="freesidestatus">
+ <OPTION VALUE="">(all)
+ <OPTION VALUE="NULL">unprocessed
+ <OPTION VALUE="done"">processed
+</SELECT><BR>
<INPUT TYPE="submit" VALUE="Search Call Detail Records">
<%= include('/elements/footer.html') %>
Index: cdr.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cdr.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cdr.html 18 Feb 2006 11:14:20 -0000 1.1
+++ cdr.html 20 Mar 2006 19:13:27 -0000 1.2
@@ -1,13 +1,28 @@
<%
+my $title = 'Call Detail Records';
my $hashref = {};
-#process params for CDR search, populate $hashref...
-
my $count_query = 'SELECT COUNT(*) FROM cdr';
+
+#process params for CDR search, populate $hashref...
# and fixup $count_query
+if ( $cgi->param('freesidestatus') eq 'NULL' ) {
+
+ my $title = "Unprocessed $title";
+ $hashref->{'freesidestatus'} = ''; # Record.pm will take care of it
+ $count_query .= " AND ( freesidestatus IS NULL OR freesidestatus = '' )";
+
+} elsif ( $cgi->param('freesidestatus') =~ /^([\w ]+)$/ ) {
+
+ my $title = "Processed $title";
+ $hashref->{'freesidestatus'} = $1;
+ $count_query .= " AND freesidestatus = '$1'";
+
+}
+
%><%= include( 'elements/search.html',
- 'title' => 'Call Detail Records',
+ 'title' => $title,
'name' => 'call detail records',
'query' => { 'table' => 'cdr',
'hashref' => $hashref
More information about the freeside-commits
mailing list