[freeside-commits] branch FREESIDE_4_BRANCH updated. bfb7b46876ec9b25c4ccdd862a7b5868efac9675
Ivan
ivan at 420.am
Sat Aug 26 14:17:55 PDT 2017
The branch, FREESIDE_4_BRANCH has been updated
via bfb7b46876ec9b25c4ccdd862a7b5868efac9675 (commit)
from dc4563f6529ffbc7eab505e430cff956d13c5602 (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 bfb7b46876ec9b25c4ccdd862a7b5868efac9675
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Aug 26 14:17:54 2017 -0700
referral count search, RT#75757
diff --git a/FS/FS/cust_main/Search.pm b/FS/FS/cust_main/Search.pm
index d668094..09558b8 100644
--- a/FS/FS/cust_main/Search.pm
+++ b/FS/FS/cust_main/Search.pm
@@ -872,10 +872,10 @@ sub search {
##
# with referrals
##
- if ( $params->{'with_referrals'} ) {
+ if ( $params->{'with_referrals'} =~ /^\s*(\d+)\s*$/ ) {
push @where,
- ' EXISTS ( SELECT 1 FROM cust_main AS referred_cust_main
- WHERE cust_main.custnum = referred_cust_main.referral_custnum )';
+ " $1 <= ( SELECT COUNT(*) FROM cust_main AS referred_cust_main
+ WHERE cust_main.custnum = referred_cust_main.referral_custnum )";
}
##
diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html
index c458bb4..2a313a1 100755
--- a/httemplate/search/report_cust_main.html
+++ b/httemplate/search/report_cust_main.html
@@ -107,6 +107,13 @@
</TD>
</TR>
+ <& /elements/tr-input-text.html,
+ label => emt('At least this many referrals'),
+ field => 'with_referrals',
+ size => 4,
+ maxlength => 4,
+ &>
+
</TABLE>
<BR>
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Search.pm | 6 +++---
httemplate/search/report_cust_main.html | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list