lastapp searching, RT#12181
authorivan <ivan>
Mon, 2 May 2011 16:24:50 +0000 (16:24 +0000)
committerivan <ivan>
Mon, 2 May 2011 16:24:50 +0000 (16:24 +0000)
httemplate/search/cdr.html
httemplate/search/report_cdr.html

index bf59ff6..7e62447 100644 (file)
@@ -182,7 +182,7 @@ if ( $cgi->param('dst') ) {
 if ( $cgi->param('dcontext') =~ /^\s*(.+)\s*$/ ) {
   my $dcontext = $1;
   $hashref->{'dcontext'} = $dcontext;
 if ( $cgi->param('dcontext') =~ /^\s*(.+)\s*$/ ) {
   my $dcontext = $1;
   $hashref->{'dcontext'} = $dcontext;
-  push @search, "dcontext = '$dcontext'";
+  push @search, 'dcontext = '. dbh->quote($dcontext);
 }
 
 if ( $cgi->param('charged_party') ) {
 }
 
 if ( $cgi->param('charged_party') ) {
@@ -208,6 +208,12 @@ if ( $cgi->param('charged_party_or_src') ) {
   push @qsearch, $search;
 }
 
   push @qsearch, $search;
 }
 
+if ( $cgi->param('lastapp') =~ /^\s*(.+)\s*$/ ) {
+  my $lastapp = $1;
+  $hashref->{'lastapp'} = $lastapp;
+  push @search, 'lastapp = '. dbh->quote($lastapp);
+}
+
 if ( $cgi->param('svcnum') =~ /^([\d, ]+)$/ ) {
   my $svcnum = $1;
   my $search = "svcnum IN ($svcnum)";
 if ( $cgi->param('svcnum') =~ /^([\d, ]+)$/ ) {
   my $svcnum = $1;
   my $search = "svcnum IN ($svcnum)";
index 866606c..04cd417 100644 (file)
   </TR>
 
   <TR>
   </TR>
 
   <TR>
-    <TD ALIGN="right">Charged Party or Source #: </TD>
+    <TD ALIGN="right">Last Application: </TD>
     <TD>
     <TD>
-      <INPUT TYPE="text" NAME="charged_party_or_src" VALUE="<% join(',', @charged_party_or_src ) |h %>" >
+      <INPUT TYPE="text" NAME="lastapp" VALUE="" >
+    </TD>
+  </TR>
+
+  <TR>
+    <TD ALIGN="right">Freeside service #: </TD>
+    <TD>
+      <INPUT TYPE="text" NAME="svcnum" VALUE="<% join(',', @svcnum ) %>" >
     </TD>
   </TR>
 
     </TD>
   </TR>