[freeside-commits] branch master updated. e7ad2eb96136818535381e41c2483bea121084cc

Ivan ivan at 420.am
Wed May 28 00:09:05 PDT 2014


The branch, master has been updated
       via  e7ad2eb96136818535381e41c2483bea121084cc (commit)
      from  c5922713bc199600bc8c203155a4016c9d24cbbc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e7ad2eb96136818535381e41c2483bea121084cc
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed May 28 00:09:04 2014 -0700

    fix credit limit query for older DBD::Pg, RT#27267

diff --git a/FS/FS/cust_main/Credit_Limit.pm b/FS/FS/cust_main/Credit_Limit.pm
index 238d885..4b2fbdf 100644
--- a/FS/FS/cust_main/Credit_Limit.pm
+++ b/FS/FS/cust_main/Credit_Limit.pm
@@ -42,13 +42,10 @@ sub check_credit_limit {
 
   #false laziness  w/svc_phone->sum_cdrs / psearch_cdrs
   my $sum = qsearchs( {
-    'select'  => 'SUM(rated_price) AS rated_price',
-    'table'   => 'cdr',
-    'hashref' => { 'status' => 'rated',
-                   'svcnum' => { op    => 'IN',
-                                 value => '('. join(',', at svcnum). ')',
-                               },
-                 },
+    'select'    => 'SUM(rated_price) AS rated_price',
+    'table'     => 'cdr',
+    'hashref'   => { 'status' => 'rated', },
+    'extra_sql' => ' AND svcnum IN ('. join(',', at svcnum). ') ',
   } );
 
   return '' unless $sum->rated_price > $credit_limit;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_main/Credit_Limit.pm |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)




More information about the freeside-commits mailing list