summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2004-10-25 23:39:06 +0000
committerivan <ivan>2004-10-25 23:39:06 +0000
commit5f69e7b4fa45c720a366eee314379ba10d5f8d34 (patch)
tree66aa043bfe169cebe2ef369b91a6af23cb4b0ef9 /httemplate
parentee3760985fc43588e7eab5033b704cb7528f049d (diff)
hopefully fix tax report for taxclass & named tax edge cases
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/report_tax.cgi24
1 files changed, 12 insertions, 12 deletions
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index bb376214f..885c764da 100755
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -64,18 +64,18 @@ foreach my $r (
my @taxparam = my @param = qw( county county state state country );
- my $num_others =
- scalar_sql( $r, [qw( country state state county county taxname taxname )],
- "SELECT COUNT(*) FROM cust_main_county
- WHERE country = ?
- AND ( state = ? OR ( state IS NULL AND ? = '' ) )
- AND ( county = ? OR ( county IS NULL AND ? = '' ) )
- AND ( taxname = ? OR ( taxname IS NULL AND ? = '' ) ) "
- );
-
- die "didn't even find self?" unless $num_others;
-
- if ( $num_others > 1 ) {
+# my $num_others =
+# scalar_sql( $r, [qw( country state state county county taxname taxname )],
+# "SELECT COUNT(*) FROM cust_main_county
+# WHERE country = ?
+# AND ( state = ? OR ( state IS NULL AND ? = '' ) )
+# AND ( county = ? OR ( county IS NULL AND ? = '' ) )
+# AND ( taxname = ? OR ( taxname IS NULL AND ? = '' ) ) "
+# );
+#
+# die "didn't even find self?" unless $num_others;
+
+ if ( $r->taxclass ) {
$fromwhere .= " AND ( taxclass = ? ) ";
push @param, 'taxclass';
}