diff options
| author | ivan <ivan> | 2007-12-15 01:45:26 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2007-12-15 01:45:26 +0000 |
| commit | a7000a6ef1f5584e0f4ae62abf0df8bba30671ed (patch) | |
| tree | 0b59a9256a3ac2f9857f557263c0f6ae6e62c7c2 /FS | |
| parent | 6eaf417a35cf3488bd2f246c9ecbd03fdcabad7a (diff) | |
fix earlier drain bramage
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/cust_bill.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 7e118174e..619a19953 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2742,7 +2742,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; @@ -2750,6 +2750,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 |
