[freeside-commits] freeside/FS/FS/Cron breakage.pm,1.2,1.3
Ivan,,,
ivan at wavetail.420.am
Wed Nov 18 22:21:33 PST 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/Cron
In directory wavetail.420.am:/tmp/cvs-serv26702
Modified Files:
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.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- breakage.pm 4 Nov 2009 01:04:35 -0000 1.2
+++ breakage.pm 19 Nov 2009 06:21:31 -0000 1.3
@@ -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