[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 97830d790f335a46aae8a03235b19177169d1bb2
Mark Wells
mark at 420.am
Mon Feb 27 15:59:21 PST 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 97830d790f335a46aae8a03235b19177169d1bb2 (commit)
from 5758caa3d3d457d1c2d7f2d39386224180f8136c (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 97830d790f335a46aae8a03235b19177169d1bb2
Author: Mark Wells <mark at freeside.biz>
Date: Mon Feb 27 15:57:40 2012 -0800
bug fixes for #14698
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm
index 4a3c440..186108c 100755
--- a/FS/FS/svc_broadband.pm
+++ b/FS/FS/svc_broadband.pm
@@ -394,18 +394,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
});
@@ -542,8 +545,6 @@ sub router {
qsearchs('router', { routernum => $self->routernum });
}
-=back
-
=item allowed_routers
Returns a list of allowed FS::router objects.
@@ -552,10 +553,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