[freeside-commits] freeside/FS/FS Schema.pm, 1.345, 1.346 nas.pm, 1.12, 1.13 svc_broadband.pm, 1.32, 1.33
Mark Wells
mark at wavetail.420.am
Wed Dec 28 15:55:34 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv5724/FS/FS
Modified Files:
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.345
retrieving revision 1.346
diff -u -w -d -r1.345 -r1.346
--- Schema.pm 19 Dec 2011 01:59:14 -0000 1.345
+++ Schema.pm 28 Dec 2011 23:55:31 -0000 1.346
@@ -2279,6 +2279,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.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- nas.pm 10 Nov 2011 21:40:04 -0000 1.12
+++ nas.pm 28 Dec 2011 23:55:32 -0000 1.13
@@ -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.32
retrieving revision 1.33
diff -u -w -d -r1.32 -r1.33
--- svc_broadband.pm 19 Dec 2011 01:59:14 -0000 1.32
+++ svc_broadband.pm 28 Dec 2011 23:55:32 -0000 1.33
@@ -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;
};
@@ -399,11 +399,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