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 /FS | |
parent | 2a863bbb144830dfb8fca4afb3af76a84a647c76 (diff) |
added svc_broadband description which is appended to Site Name in prizm export
Diffstat (limited to 'FS')
-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 |
3 files changed, 18 insertions, 5 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') |