add otaker to package search, RT#16937
[freeside.git] / httemplate / search / cust_bill_pkg_referral.html
index 3cb434c..1289ff7 100644 (file)
@@ -146,6 +146,21 @@ if ( @status_where ) {
     ') IN (' . join(',', @status_where) .')';
 }
 
+my @refnum;
+foreach my $refnum ($cgi->param('refnum')) {
+  if ( $refnum =~ /^\d+$/ ) {
+    push @refnum, $refnum;
+  }
+}
+if ( @refnum ) {
+  push @where, 'cust_main.refnum IN ('.join(',', @refnum).')';
+}
+
+my @cust_classnums = grep /^\d+$/, $cgi->param('cust_classnum');
+if ( @cust_classnums ) {
+  push @where, 'cust_main.classnum IN ('.join(',', @cust_classnums).')';
+}
+
 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
   push @where, "cust_main.agentnum = $1";
 }