[freeside-commits] branch master updated. d64984bbfe839fbe71830862a6841380425f3dbe
Mark Wells
mark at 420.am
Mon Feb 27 16:00:04 PST 2012
The branch, master has been updated
via d64984bbfe839fbe71830862a6841380425f3dbe (commit)
from 65befdb357c410bd24bf411551cd9d091d82b10d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d64984bbfe839fbe71830862a6841380425f3dbe
Author: Mark Wells <mark at freeside.biz>
Date: Mon Feb 27 15:59:59 2012 -0800
bug fixes for #14698
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index ac463bc..a327f46 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -395,18 +395,21 @@ sub check {
? qsearchs('cust_svc', { 'svcnum' => $self->svcnum } )
: '';
my $cust_pkg;
+ my $svcpart;
if ($cust_svc) {
$cust_pkg = $cust_svc->cust_pkg;
+ $svcpart = $cust_svc->svcpart;
}else{
$cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $self->pkgnum } );
return "Invalid pkgnum" unless $cust_pkg;
+ $svcpart = $self->svcpart;
}
my $agentnum = $cust_pkg->cust_main->agentnum if $cust_pkg;
if ($self->routernum) {
return "Router ".$self->routernum." does not provide this service"
unless qsearchs('part_svc_router', {
- svcpart => $self->cust_svc->svcpart,
+ svcpart => $svcpart,
routernum => $self->routernum
});
@@ -543,8 +546,6 @@ sub router {
qsearchs('router', { routernum => $self->routernum });
}
-=back
-
=item allowed_routers
Returns a list of allowed FS::router objects.
@@ -553,10 +554,13 @@ Returns a list of allowed FS::router objects.
sub allowed_routers {
my $self = shift;
+ my $svcpart = $self->svcnum ? $self->cust_svc->svcpart : $self->svcpart;
map { $_->router } qsearch('part_svc_router',
{ svcpart => $self->cust_svc->svcpart });
}
+=back
+
#class method
sub _upgrade_data {
diff --git a/httemplate/elements/tr-select-router_block_ip.html b/httemplate/elements/tr-select-router_block_ip.html
index a4ce664..45d1dac 100644
--- a/httemplate/elements/tr-select-router_block_ip.html
+++ b/httemplate/elements/tr-select-router_block_ip.html
@@ -60,6 +60,9 @@ my $svc_x = $opt{'object'};
if ( $svc_x ) {
$opt{$_} = $svc_x->$_
foreach qw(routernum blocknum ip_addr svcpart);
+ if ( $svc_x->svcnum ) {
+ $opt{'svcpart'} = $svc_x->cust_svc->svcpart;
+ }
}
my $svcpart = $opt{'svcpart'} || '';
-----------------------------------------------------------------------
Summary of changes:
FS/FS/svc_broadband.pm | 10 +++++++---
httemplate/elements/tr-select-router_block_ip.html | 3 +++
2 files changed, 10 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list