From 717d562bcfb691d971a01b738d0b55cdda480cf0 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 26 Oct 2004 06:33:29 +0000 Subject: and one last case with named and not named taxes in the same region, ack --- httemplate/search/report_tax.cgi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index 838335b78..aa9ed6f11 100755 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -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", -- cgit v1.2.1