and one last case with named and not named taxes in the same region, ack
authorivan <ivan>
Tue, 26 Oct 2004 06:33:30 +0000 (06:33 +0000)
committerivan <ivan>
Tue, 26 Oct 2004 06:33:30 +0000 (06:33 +0000)
httemplate/search/report_tax.cgi

index 838335b..aa9ed6f 100755 (executable)
@@ -122,7 +122,10 @@ foreach my $r (
   my @param = @base_param; 
 
   #match itemdesc if necessary!
-  my $named_tax = $r->taxname ? 'AND itemdesc = '. dbh->quote($r->taxname) : '';
+  my $named_tax =
+    $r->taxname
+      ? 'AND itemdesc = '. dbh->quote($r->taxname)
+      : "AND itemdesc IS NULL or itemdesc = ''";
   my $x = scalar_sql($r, \@taxparam,
     "SELECT SUM(cust_bill_pkg.setup+cust_bill_pkg.recur) $taxwhere ".
     "AND pkgnum = 0 $named_tax",