+ 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 {
+ my $class = shift;
+
+ # set routernum to addr_block.routernum
+ foreach my $self (qsearch('svc_broadband', {
+ blocknum => {op => '!=', value => ''},
+ routernum => ''
+ })) {
+ my $addr_block = $self->addr_block;
+ if ( my $routernum = $addr_block->routernum ) {
+ $self->set(routernum => $routernum);
+ my $error = $self->replace;
+ die "error assigning routernum $routernum to service ".$self->svcnum.
+ ":\n$error\n"
+ if $error;
+ }
+ else {
+ warn "svcnum ".$self->svcnum.
+ ": no routernum in address block ".$addr_block->cidr.", skipped\n";
+ }
+ }
+ '';