[freeside-commits] freeside/FS/FS part_pkg.pm,1.83,1.84

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Feb 3 13:33:14 PST 2009


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv3956

Modified Files:
	part_pkg.pm 
Log Message:
the taxproductnum is ALWAYS one of the filtering conditions

Index: part_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg.pm,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- part_pkg.pm	25 Jan 2009 23:58:24 -0000	1.83
+++ part_pkg.pm	3 Feb 2009 21:33:12 -0000	1.84
@@ -1015,10 +1015,13 @@
     ')';
   # much more CCH oddness in m2m -- this is kludgy
   my @tpnums = $self->_expand_cch_taxproductnum($class);
-  $extra_sql .= ' AND ('.
-                          join(' OR ', map{ "taxproductnum = $_" } @tpnums ).
-                     ')'
-     if @tpnums;
+  if (scalar(@tpnums)) {
+    $extra_sql .= ' AND ('.
+                            join(' OR ', map{ "taxproductnum = $_" } @tpnums ).
+                       ')';
+  } else {
+    $extra_sql .= ' AND ( 0 = 1 )';
+  }
 
   my $addl_from = 'LEFT JOIN part_pkg_taxproduct USING ( taxproductnum )';
   my $order_by = 'ORDER BY taxclassnum, length(geocode) desc, length(taxproduct) desc';



More information about the freeside-commits mailing list