From: levinse Date: Mon, 10 Jan 2011 22:00:10 +0000 (+0000) Subject: add VPI/VCI fields to svc_dsl, RT5059 X-Git-Tag: freeside_2_3_0~776 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=878e77215666e79591eff1ac67eb119994a08d05 add VPI/VCI fields to svc_dsl, RT5059 --- diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index a1aa0c9dc..93c2c952a 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -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, '', '', diff --git a/FS/FS/svc_dsl.pm b/FS/FS/svc_dsl.pm index c5557ec6f..89827e8d7 100644 --- a/FS/FS/svc_dsl.pm +++ b/FS/FS/svc_dsl.pm @@ -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') diff --git a/httemplate/edit/svc_dsl.cgi b/httemplate/edit/svc_dsl.cgi index 7493d98b9..9b4d1c77d 100644 --- a/httemplate/edit/svc_dsl.cgi +++ b/httemplate/edit/svc_dsl.cgi @@ -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 ); } };