diff options
Diffstat (limited to 'FS/FS/svc_acct.pm')
-rw-r--r-- | FS/FS/svc_acct.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 50553c5c7..201e8818e 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1462,7 +1462,7 @@ sub set_password { if ( !$encoding ) { # set encoding to system default ($encoding, $encryption) = - split(/-/, lc($conf->config('default-password-encoding'))); + split(/-/, lc($conf->config('default-password-encoding') || '')); $encoding ||= 'legacy'; $self->_password_encoding($encoding); } @@ -2846,6 +2846,9 @@ sub search { push @where, "svcpart = $1"; } + # sector and tower + my @where_sector = $class->tower_sector_sql($params); + push @where, @where_sector if @where_sector; # here is the agent virtualization #if ($params->{CurrentUser}) { @@ -2873,6 +2876,9 @@ sub search { ' LEFT JOIN cust_pkg USING ( pkgnum ) '. ' LEFT JOIN cust_main USING ( custnum ) '; + $addl_from .= ' LEFT JOIN tower_sector USING ( sectornum )' + if @where_sector; + my $count_query = "SELECT COUNT(*) FROM svc_acct $addl_from $extra_sql"; #if ( keys %svc_acct ) { # $count_query .= ' WHERE '. |