[freeside-commits] freeside/FS/FS/Cron breakage.pm, 1.1.2.3, 1.1.2.4

Ivan,,, ivan at wavetail.420.am
Wed Nov 18 22:21:34 PST 2009


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

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	breakage.pm 
Log Message:
consider credits and refunds in breakage, RT#6407

Index: breakage.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Cron/breakage.pm,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- breakage.pm	4 Nov 2009 01:04:36 -0000	1.1.2.3
+++ breakage.pm	19 Nov 2009 06:21:32 -0000	1.1.2.4
@@ -30,19 +30,19 @@
       if $opt{'v'};
 
     #find customers w/negative balance older than $days (and no activity since)
-    # no invoices / payments (/credits/refunds?) newer than $since
-    #  (except antother breakage invoice???)
+    # and no activity (invoices/payments/credits/refunds) newer than $since
+    #  (XXX except antother breakage invoice???)
 
-    my $extra_sql = ' AND 0 > '. FS::cust_main->balance_sql;
-    $extra_sql .= " AND ". join(' AND ',
-      map {"
-            NOT EXISTS ( SELECT 1 FROM $_
-                           WHERE $_.custnum = cust_main.custnum
-                             AND _date >= $since
-                       )
-          ";}
-          qw( cust_bill cust_pay ) # cust_credit cust_refund );
-    );
+    my $extra_sql =
+      ' AND 0 > '. FS::cust_main->balance_sql.
+      ' AND '. join(' AND ', map {
+        " NOT EXISTS (
+            SELECT 1 FROM $_
+              WHERE $_.custnum = cust_main.custnum
+                AND _date >= $since
+          ) "
+        } qw( cust_bill cust_pay cust_credit cust_refund )
+      );
 
     my @customers = qsearch({
       'table'     => 'cust_main',



More information about the freeside-commits mailing list