From bc502a713cb1e8164ece5bc224cde4f301764bfe Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 26 Oct 2004 06:33:30 +0000 Subject: [PATCH] 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", -- 2.11.0