[freeside-commits] freeside/FS/FS cust_main.pm,1.481,1.482
Ivan,,,
ivan at wavetail.420.am
Thu Dec 10 15:03:21 PST 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv5939
Modified Files:
cust_main.pm
Log Message:
fully fix bulk customer reports, RT#6778
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.481
retrieving revision 1.482
diff -u -d -r1.481 -r1.482
--- cust_main.pm 4 Dec 2009 04:40:28 -0000 1.481
+++ cust_main.pm 10 Dec 2009 23:03:18 -0000 1.482
@@ -8374,24 +8374,41 @@
# classnum
###
- my @classnum = grep /^(\d*)$/, @{ $params->{'classnum'} };
- if ( @classnum ) {
- push @where, '( '. join(' OR ', map {
- $_ ? "cust_main.classnum = $_"
- : "cust_main.classnum IS NULL"
- }
- @classnum
- ).
- ' )';
+ if ( $params->{'classnum'} ) {
+
+ my @classnum = ref( $params->{'classnum'} )
+ ? @{ $params->{'classnum'} }
+ : ( $params->{'classnum'} );
+
+ @classnum = grep /^(\d*)$/, @classnum;
+
+ if ( @classnum ) {
+ push @where, '( '. join(' OR ', map {
+ $_ ? "cust_main.classnum = $_"
+ : "cust_main.classnum IS NULL"
+ }
+ @classnum
+ ).
+ ' )';
+ }
+
}
###
# payby
###
- my @payby = grep /^([A-Z]{4})$/, @{ $params->{'payby'} };
- if ( @payby ) {
- push @where, '( '. join(' OR ', map "cust_main.payby = '$_'", @payby). ' )';
+ if ( $params->{'payby'} ) {
+
+ my @payby = ref( $params->{'payby'} )
+ ? @{ $params->{'payby'} }
+ : ( $params->{'payby'} );
+
+ @payby = grep /^([A-Z]{4})$/, @{ $params->{'payby'} };
+
+ push @where, '( '. join(' OR ', map "cust_main.payby = '$_'", @payby). ' )'
+ if @payby;
+
}
###
More information about the freeside-commits
mailing list