diff options
author | mark <mark> | 2012-01-18 02:48:03 +0000 |
---|---|---|
committer | mark <mark> | 2012-01-18 02:48:03 +0000 |
commit | 5697bba078d6f9e263775bc2d887cc1ce3ff873d (patch) | |
tree | 2523653352b55604174c8c462089a685d567e9f5 /FS/FS/svc_acct.pm | |
parent | 57fe641524a2e3057f577074b26ab75b24534bbc (diff) |
search services by tower/sector, #15950
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 659635430..82a5a8a61 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1464,7 +1464,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); } @@ -2848,6 +2848,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}) { @@ -2875,6 +2878,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 '. |