summaryrefslogtreecommitdiff
path: root/FS/FS/svc_acct.pm
diff options
context:
space:
mode:
authormark <mark>2012-01-18 02:48:03 +0000
committermark <mark>2012-01-18 02:48:03 +0000
commit5697bba078d6f9e263775bc2d887cc1ce3ff873d (patch)
tree2523653352b55604174c8c462089a685d567e9f5 /FS/FS/svc_acct.pm
parent57fe641524a2e3057f577074b26ab75b24534bbc (diff)
search services by tower/sector, #15950
Diffstat (limited to 'FS/FS/svc_acct.pm')
-rw-r--r--FS/FS/svc_acct.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 6596354..82a5a8a 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 '.