X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct.pm;h=37c55d67cdfba4c792ee68e4adc411c71d0103f2;hb=b7b5088f7e2f5dd21c8c53d98461609d1c89d6e3;hp=e8c797afa79b2b72f72c3bae2795d486e10570de;hpb=da199f671b3f990c1c81e2806a9a04b1877d9c90;p=freeside.git diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index e8c797afa..37c55d67c 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -2227,20 +2227,19 @@ sub _op_overlimit { my $cust_pkg = $self->cust_svc->cust_pkg; - my $conf_overlimit = + my @conf_overlimit = $cust_pkg ? $conf->config('overlimit_groups', $cust_pkg->cust_main->agentnum ) : $conf->config('overlimit_groups'); foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { - my $groups = $conf_overlimit || $part_export->option('overlimit_groups'); - next unless $groups; - - my $gref = &{ $self->_fieldhandlers->{'usergroup'} }( $self, $groups ); + my @groups = scalar(@conf_overlimit) ? @conf_overlimit + : split(' ',$part_export->option('overlimit_groups')); + next unless scalar(@groups); my $other = new FS::svc_acct $self->hashref; - $other->usergroup( $gref ); + $other->usergroup(\@groups); my($new,$old); if ($action eq 'suspend') { @@ -2934,7 +2933,7 @@ sub search { #agentnum if ( $params->{'agentnum'} =~ /^(\d+)$/ and $1 ) { - push @where, "agentnum = $1"; + push @where, "cust_main.agentnum = $1"; } #custnum