simple reporting for new tax system
[freeside.git] / httemplate / search / cust_bill_pkg.cgi
index 2354be9..61d9a75 100644 (file)
@@ -70,8 +70,6 @@ my $agentnums_sql =
 
 my @where = ( $agentnums_sql );
 
-push @where, "(duplicate IS NULL OR duplicate = '' )";
-
 my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
 push @where, "_date >= $beginning",
              "_date <= $ending";
@@ -140,6 +138,13 @@ if ( $cgi->param('out') ) {
 
 }
 
+if ($cgi->param('itemdesc')) {
+  if ($cgi->param('itemdesc') eq 'Tax') {
+    push @where, "(itemdesc='Tax' OR itemdesc is null)";
+  }else{
+    push @where, 'itemdesc='. dbh->quote($cgi->param('itemdesc'));
+  }
+}
 push @where, 'pkgnum != 0' if $cgi->param('nottax');
 push @where, 'pkgnum  = 0' if $cgi->param('istax');