diff options
author | jeff <jeff> | 2007-01-12 23:27:09 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-01-12 23:27:09 +0000 |
commit | 52dbc041b5ba187cc2a503e5ad2d800b1a2e5a1f (patch) | |
tree | 4cac06622813c72435722ead8ecabeeb867914a7 | |
parent | 2a863bbb144830dfb8fca4afb3af76a84a647c76 (diff) |
added svc_broadband description which is appended to Site Name in prizm export
-rw-r--r-- | FS/FS/Schema.pm | 1 | ||||
-rw-r--r-- | FS/FS/part_export/prizm.pm | 12 | ||||
-rwxr-xr-x | FS/FS/svc_broadband.pm | 10 | ||||
-rw-r--r-- | httemplate/edit/svc_broadband.cgi | 17 | ||||
-rw-r--r-- | httemplate/view/svc_broadband.cgi | 6 |
5 files changed, 40 insertions, 6 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 9d3eb8060..88bb6acc3 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -1161,6 +1161,7 @@ sub tables_hashref { 'svc_broadband' => { 'columns' => [ 'svcnum', 'int', '', '', '', '', + 'description', 'varchar', 'NULL', $char_d, '', '', 'blocknum', 'int', '', '', '', '', 'speed_up', 'int', '', '', '', '', 'speed_down', 'int', '', '', '', '', diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm index 92f1aec55..711888d1f 100644 --- a/FS/FS/part_export/prizm.pm +++ b/FS/FS/part_export/prizm.pm @@ -118,7 +118,7 @@ sub _export_insert { $err_or_som = $self->prizm_command('NetworkIfService', 'addProvisionedElement', $networkid, $svc->mac_addr, - $name, + $name . " " . $svc->description, $location, $contact, sprintf("%032X", $svc->authkey), @@ -266,7 +266,17 @@ sub _export_replace { grep { exists($freeside2prizm{$_}) } fields( 'svc_broadband' ); + if ($old->description ne $new->description) { + my $cust_main = $old->cust_svc->cust_pkg->cust_main; + my $name = defined($cust_main->dbdef_table->column('ship_last')) + ? $cust_main->ship_name + : $cust_main->name; + push @values, $name . " " . $new->description; + push @names, "Site Name"; + } + my $element = $err_or_som->result->[0]->elementId; + $err_or_som = $self->prizm_command('NetworkIfService', 'setElementConfig', [ $element ], \@names, diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index b047c9a73..ab97ac82c 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -93,10 +93,11 @@ sub table_info { 'display_weight' => 50, 'cancel_weight' => 70, 'fields' => { - 'speed_down' => 'Maximum download speed for this service in Kbps. 0 denotes unlimited.', - 'speed_up' => 'Maximum upload speed for this service in Kbps. 0 denotes unlimited.', - 'ip_addr' => 'IP address. Leave blank for automatic assignment.', - 'blocknum' => 'Address block.', + 'description' => 'Descriptive label for this particular device.', + 'speed_down' => 'Maximum download speed for this service in Kbps. 0 denotes unlimited.', + 'speed_up' => 'Maximum upload speed for this service in Kbps. 0 denotes unlimited.', + 'ip_addr' => 'IP address. Leave blank for automatic assignment.', + 'blocknum' => 'Address block.', }, }; } @@ -193,6 +194,7 @@ sub check { my $error = $self->ut_numbern('svcnum') || $self->ut_foreign_key('blocknum', 'addr_block', 'blocknum') + || $self->ut_textn('description') || $self->ut_number('speed_up') || $self->ut_number('speed_down') || $self->ut_ipn('ip_addr') diff --git a/httemplate/edit/svc_broadband.cgi b/httemplate/edit/svc_broadband.cgi index 30eb6319f..2a5a6509a 100644 --- a/httemplate/edit/svc_broadband.cgi +++ b/httemplate/edit/svc_broadband.cgi @@ -67,7 +67,8 @@ %my $p1 = popurl(1); % %my ($ip_addr, $speed_up, $speed_down, $blocknum, $mac_addr, -% $latitude, $longitude, $altitude, $vlan_profile, $auth_key) = +% $latitude, $longitude, $altitude, $vlan_profile, $auth_key, +% $description) = % ($svc_broadband->ip_addr, % $svc_broadband->speed_up, % $svc_broadband->speed_down, @@ -78,6 +79,7 @@ % $svc_broadband->altitude, % $svc_broadband->vlan_profile, % $svc_broadband->auth_key, +% $svc_broadband->description, % ); % % @@ -99,6 +101,19 @@ Service #<B><%$svcnum ? $svcnum : "(NEW)"%></B><BR><BR> <%&ntable("#cccccc",2)%> <TR> + <TD ALIGN="right">Description</TD> + <TD BGCOLOR="#ffffff"> +% if ( $part_svc->part_svc_column('description')->columnflag eq 'F' ) { + + <INPUT TYPE="hidden" NAME="description" VALUE="<%$description%>"><%$description%> +% } else { + + <INPUT TYPE="text" NAME="description" VALUE="<%$description%>"> +% } + + </TD> + </TR> + <TR> <TD ALIGN="right">IP Address</TD> <TD BGCOLOR="#ffffff"> % if ( $part_svc->part_svc_column('ip_addr')->columnflag eq 'F' ) { diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index 010439e90..cfece5cb4 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -39,6 +39,7 @@ % $altitude, % $vlan_profile, % $auth_key, +% $description, % ) = ( % $router->getfield('routername'), % $router->getfield('routernum'), @@ -53,6 +54,7 @@ % $svc_broadband->altitude, % $svc_broadband->vlan_profile, % $svc_broadband->auth_key, +% $svc_broadband->description, % ); % @@ -79,6 +81,10 @@ <TD BGCOLOR="#ffffff"><%$svcnum%></TD> </TR> <TR> + <TD ALIGN="right">Description</TD> + <TD BGCOLOR="#ffffff"><%$description%></TD> + </TR> + <TR> <TD ALIGN="right">Router</TD> <TD BGCOLOR="#ffffff"><%$routernum%>: <%$routername%></TD> </TR> |