add VPI/VCI fields to svc_dsl, RT5059
authorlevinse <levinse>
Mon, 10 Jan 2011 22:00:10 +0000 (22:00 +0000)
committerlevinse <levinse>
Mon, 10 Jan 2011 22:00:10 +0000 (22:00 +0000)
FS/FS/Schema.pm
FS/FS/svc_dsl.pm
httemplate/edit/svc_dsl.cgi

index a1aa0c9..93c2c95 100644 (file)
@@ -1969,6 +1969,8 @@ sub tables_hashref {
         'local_voice_provider', 'varchar', 'NULL', $char_d,  '', '',
         'circuitnum',              'varchar', 'NULL', $char_d,  '', '',
         'rate_band',              'varchar', 'NULL', $char_d,  '', '',
+       'vpi',     'int', 'NULL',       '', '', '',
+       'vci',     'int', 'NULL',       '', '', '',
         'isp_chg',   'char', 'NULL',       1,  '', '', 
         'isp_prev',              'varchar', 'NULL', $char_d,  '', '',
         'username',              'varchar', 'NULL', $char_d,  '', '',
index c5557ec..89827e8 100644 (file)
@@ -81,6 +81,10 @@ Vendor/telco DSL order status (e.g. (N)ew, (A)ssigned, (R)ejected, (M)revised,
 
 =item circuitnum - Circuit #
 
+=item vpi
+
+=item vci
+
 =item rate_band - Rate Band
 
 =item isp_chg
@@ -156,6 +160,8 @@ sub table_info {
            'rate_band' => {    label => 'Rate Band',
                                    disable_inventory => 1,
                        },
+           'vpi' => { label => 'VPI', disable_inventory => 1 },
+           'vci' => { label => 'VCI', disable_inventory => 1 },
            'isp_chg' => {      label => 'ISP Changing?', 
                                type => 'checkbox', %dis2 },
            'isp_prev' => {     label => 'Current or Previous ISP',
@@ -236,7 +242,7 @@ sub check {
   my $error = 
     $self->ut_numbern('svcnum')
     || $self->ut_numbern('pushed')
-    || $self->ut_number('desired_due_date')
+    || $self->ut_numbern('desired_due_date')
     || $self->ut_numbern('due_date')
     || $self->ut_textn('vendor_order_id')
     || $self->ut_textn('vendor_qual_id')
@@ -250,6 +256,8 @@ sub check {
     || $self->ut_textn('local_voice_provider')
     || $self->ut_textn('circuitnum')
     || $self->ut_textn('rate_band')
+    || $self->ut_numbern('vpi')
+    || $self->ut_numbern('vci')
     || $self->ut_alphan('isp_chg')
     || $self->ut_textn('isp_prev')
     || $self->ut_textn('username')
index 7493d98..9b4d1c7 100644 (file)
@@ -55,7 +55,7 @@ my $edit_cb = sub {
        # else add any other export-specific stuff here
     }
     else {
-       # XXX allow editing everything
+       push @fields, qw( first last company phonenum circuitnum rate_band vpi vci );
     }
 };
 
@@ -65,7 +65,6 @@ my $new_cb = sub {
     die "more than one DSL-pulling export attached to svcpart ".$part_svc->svcpart
        if ( scalar(@exports) > 1 );
 
-    if ( scalar(@exports) == 1 ) {
        my $cust_main = $cust_pkg->cust_main;
        my $defsvctn = $cust_main->ship_daytime ? $cust_main->ship_daytime
                                                : $cust_main->daytime;
@@ -90,6 +89,7 @@ my $new_cb = sub {
            },
        );
 
+    if ( scalar(@exports) == 1 ) {
        my $export = @exports[0];               
        if($export->exporttype eq 'ikano') {
            my $ddd = $cust_pkg->start_date;
@@ -120,8 +120,8 @@ my $new_cb = sub {
        }
        # else add any other export-specific stuff here
     }
-    else {
-       # XXX display everything when no exports attached
+    else { # display non-export and non-Ikano fields
+       push @fields, qw( rate_band circuitnum vpi vci );
     }
 };
 </%init>