summaryrefslogtreecommitdiff
path: root/httemplate/edit/router.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-07-02 21:11:29 -0700
committerIvan Kohler <ivan@freeside.biz>2013-07-02 21:11:29 -0700
commit3d0a1bb06b895c5be6e3f0517d355442a6b1e125 (patch)
tree84069ebc3254825b952a482e11cdbbbc69f6fe85 /httemplate/edit/router.cgi
parentf3b99c11d6eed33f467dda360180a698a85c54e8 (diff)
parentd62206a94d9d49ef96640e0a8ec492679f8345e9 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/router.cgi')
-rwxr-xr-xhttemplate/edit/router.cgi10
1 files changed, 9 insertions, 1 deletions
diff --git a/httemplate/edit/router.cgi b/httemplate/edit/router.cgi
index fdcd7b3b3..0df9b457e 100755
--- a/httemplate/edit/router.cgi
+++ b/httemplate/edit/router.cgi
@@ -29,8 +29,15 @@ die "access denied"
unless $curuser->access_right('Broadband configuration')
|| $curuser->access_right('Broadband global configuration');
+my @svc_x = 'svc_broadband';
+if ( FS::Conf->new->exists('svc_acct-ip_addr') ) {
+ push @svc_x, 'svc_acct';
+}
+
my $callback = sub {
my ($cgi, $object, $fields) = (shift, shift, shift);
+
+ my $extra_sql = ' AND svcdb IN(' . join(',', map { "'$_'" } @svc_x) . ')';
unless ($object->svcnum) {
push @{$fields},
{ 'type' => 'tablebreak-tr-title',
@@ -41,7 +48,8 @@ my $callback = sub {
'target_table' => 'part_svc',
'link_table' => 'part_svc_router',
'name_col' => 'svc',
- 'hashref' => { 'svcdb' => 'svc_broadband', 'disabled' => '' },
+ 'hashref' => { 'disabled' => '' },
+ 'extra_sql' => $extra_sql,
};
}
};