[freeside-commits] freeside/FS/FS Schema.pm, 1.317.2.25, 1.317.2.26 nas.pm, 1.9.12.3, 1.9.12.4 svc_broadband.pm, 1.24.2.8, 1.24.2.9
Mark Wells
mark at wavetail.420.am
Wed Dec 28 15:56:21 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6000/FS/FS
Modified Files:
Tag: FREESIDE_2_3_BRANCH
Schema.pm nas.pm svc_broadband.pm
Log Message:
broadband_nas export, #15284
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.317.2.25
retrieving revision 1.317.2.26
diff -u -w -d -r1.317.2.25 -r1.317.2.26
--- Schema.pm 19 Dec 2011 01:59:16 -0000 1.317.2.25
+++ Schema.pm 28 Dec 2011 23:56:19 -0000 1.317.2.26
@@ -2282,6 +2282,7 @@
'server', 'varchar', 'NULL', 64, '', '',
'community', 'varchar', 'NULL', 50, '', '',
'description', 'varchar', '', 200, 'RADIUS Client', '',
+ 'svcnum', 'int', 'NULL', '', '', '',
],
'primary_key' => 'nasnum',
'unique' => [ [ 'nasname' ], ],
Index: nas.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/nas.pm,v
retrieving revision 1.9.12.3
retrieving revision 1.9.12.4
diff -u -w -d -r1.9.12.3 -r1.9.12.4
--- nas.pm 10 Nov 2011 21:40:21 -0000 1.9.12.3
+++ nas.pm 28 Dec 2011 23:56:19 -0000 1.9.12.4
@@ -50,6 +50,7 @@
=item description - a longer descriptive name
+=item svcnum - the L<FS::svc_broadband> record that 'owns' this device
=back
@@ -94,7 +95,7 @@
) || $self->SUPER::delete;
if ( $error ) {
- $dbh->rollback;
+ $dbh->rollback if $oldAutoCommit;
return $error;
}
@@ -159,6 +160,7 @@
|| $self->ut_textn('server')
|| $self->ut_textn('community')
|| $self->ut_text('description')
+ || $self->ut_foreign_keyn('svcnum', 'svc_broadband', 'svcnum')
;
return $error if $error;
Index: svc_broadband.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_broadband.pm,v
retrieving revision 1.24.2.8
retrieving revision 1.24.2.9
diff -u -w -d -r1.24.2.8 -r1.24.2.9
--- svc_broadband.pm 19 Dec 2011 01:59:16 -0000 1.24.2.8
+++ svc_broadband.pm 28 Dec 2011 23:56:19 -0000 1.24.2.9
@@ -2,6 +2,8 @@
use strict;
use vars qw(@ISA $conf);
+
+use base qw(FS::svc_Radius_Mixin FS::svc_Tower_Mixin FS::svc_Common);
use NetAddr::IP;
use FS::Record qw( qsearchs qsearch dbh );
use FS::svc_Common;
@@ -10,8 +12,6 @@
use FS::part_svc_router;
use FS::tower_sector;
- at ISA = qw( FS::svc_Radius_Mixin FS::svc_Tower_Mixin FS::svc_Common );
-
$FS::UID::callback{'FS::svc_broadband'} = sub {
$conf = new FS::Conf;
};
@@ -398,11 +398,11 @@
if ( $cust_pkg && ! $self->latitude && ! $self->longitude ) {
my $l = $cust_pkg->cust_location_or_main;
if ( $l->ship_latitude && $l->ship_longitude ) {
- $self->latitude = $l->ship_latitude;
- $self->longitude = $l->ship_longitude;
+ $self->latitude( $l->ship_latitude );
+ $self->longitude( $l->ship_longitude );
} elsif ( $l->latitude && $l->longitude ) {
- $self->latitude = $l->latitude;
- $self->longitude = $l->longitude;
+ $self->latitude( $l->latitude );
+ $self->longitude( $l->longitude );
}
}
More information about the freeside-commits
mailing list