fix "Add package columns" in advanced customer report under MySQL, RT#16214
[freeside.git] / httemplate / edit / svc_broadband.cgi
index 074af3d..8fccb1f 100644 (file)
@@ -6,6 +6,7 @@
      'field_callback'       => $field_callback,
      'svc_new_callback'     => $svc_edit_callback,
      'svc_edit_callback'    => $svc_edit_callback,
+     'svc_error_callback'   => $svc_edit_callback,
      'dummy'                => $cgi->query_string,
      'onsubmit'             => 'validate_coords',
      'html_foot'            => $js,
@@ -99,10 +100,9 @@ END
 ;
 
 my @fields = (
-  qw( description ip_addr speed_down speed_up ),
+  qw( description speed_down speed_up ),
   { field=>'sectornum', type=>'select-tower_sector', },
-  qw( blocknum ),
-  { field=>'block_label', type=>'fixed' },
+  { field=>'routernum', type=>'select-router_block_ip', },
   qw( mac_addr latitude longitude altitude vlan_profile 
       performance_profile authkey plan_id ),
 );
@@ -167,13 +167,6 @@ my $svc_edit_callback = sub {
 my $field_callback = sub {
   my ($cgi, $object, $fieldref) = @_;
 
-  unless ( $part_svc ) {
-    my $svcpart = $object->svcnum ? $object->cust_svc->svcpart;
-                    : $cgi->param('svcpart');
-    $part_svc = qsearchs( 'part_svc', { svcpart => $svcpart } );
-    die "No part_svc entry for svcpart $svcpart!" unless $part_svc;
-  }
-
   my $columndef = $part_svc->part_svc_column($fieldref->{'field'});
   if ($columndef->columnflag eq 'F') {
     $fieldref->{'type'} = length($columndef->columnvalue)