fix earlier drain bramage
[freeside.git] / FS / FS / cust_bill.pm
index 1f6f85b..c599488 100644 (file)
@@ -2879,7 +2879,7 @@ sub search_sql {
     #$orderby = 'ORDER BY cust_bill.custnum ASC, cust_bill._date DESC';
 
     my @newest_where = map { my $x = $_;
-                             $x = s/\bcust_bill\./newest_cust_bill./g;
+                             $x =~ s/\bcust_bill\./newest_cust_bill./g;
                              $x;
                            }
                            grep ! /^cust_main./, @search;
@@ -2887,6 +2887,7 @@ sub search_sql {
                          ? ' AND '. join(' AND ', @newest_where)
                         : '';
 
+
     push @search, "cust_bill._date = (
       SELECT(MAX(newest_cust_bill._date)) FROM cust_bill AS newest_cust_bill
         WHERE newest_cust_bill.custnum = cust_bill.custnum