[freeside-commits] branch FREESIDE_3_BRANCH updated. 0eee55572b0f8d841f7d1a863d92211d3a6d9e31
Ivan
ivan at 420.am
Wed May 28 00:09:07 PDT 2014
The branch, FREESIDE_3_BRANCH has been updated
via 0eee55572b0f8d841f7d1a863d92211d3a6d9e31 (commit)
from eafc26d312b2d7d392f117b946d63a19166bda63 (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 0eee55572b0f8d841f7d1a863d92211d3a6d9e31
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed May 28 00:09:05 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