[freeside-commits] freeside/FS/FS/cust_main Search.pm,1.7,1.8
Mark Wells
mark at wavetail.420.am
Thu Jun 30 22:33:57 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv17932/FS/FS/cust_main
Modified Files:
Search.pm
Log Message:
send email from customer view, #13444
Index: Search.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main/Search.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- Search.pm 10 Jan 2011 20:14:08 -0000 1.7
+++ Search.pm 1 Jul 2011 05:33:55 -0000 1.8
@@ -471,6 +471,33 @@
my @where = ();
my $orderby;
+ # initialize these to prevent warnings
+ $params = {
+ 'custnum' => '',
+ 'agentnum' => '',
+ 'usernum' => '',
+ 'status' => '',
+ 'address' => '',
+ 'paydate_year' => '',
+ 'invoice_terms' => '',
+ 'custbatch' => '',
+ %$params
+ };
+
+ ##
+ # explicit custnum(s)
+ ##
+
+ if ( $params->{'custnum'} ) {
+ my @custnums = ref($params->{'custnum'}) ?
+ @{ $params->{'custnum'} } :
+ $params->{'custnum'};
+ push @where,
+ 'cust_main.custnum IN (' .
+ join(',', map { $_ =~ /^(\d+)$/ ? $1 : () } @custnums ) .
+ ')' if scalar(@custnums) > 0;
+ }
+
##
# parse agent
##
More information about the freeside-commits
mailing list