freeside/httemplate/search report_tax.cgi,1.5.4.9,1.5.4.10
ivan
ivan at pouncequick.420.am
Mon Oct 25 16:39:09 PDT 2004
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory pouncequick:/tmp/cvs-serv8934
Modified Files:
Tag: FREESIDE_1_4_BRANCH
report_tax.cgi
Log Message:
hopefully fix tax report for taxclass & named tax edge cases
Index: report_tax.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_tax.cgi,v
retrieving revision 1.5.4.9
retrieving revision 1.5.4.10
diff -u -d -r1.5.4.9 -r1.5.4.10
--- report_tax.cgi 25 Oct 2004 22:48:02 -0000 1.5.4.9
+++ report_tax.cgi 25 Oct 2004 23:39:07 -0000 1.5.4.10
@@ -64,18 +64,18 @@
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;
+# 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 ) {
+ if ( $r->taxclass ) {
$fromwhere .= " AND ( taxclass = ? ) ";
push @param, 'taxclass';
}
More information about the freeside-commits
mailing list