summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2009-03-16 17:06:40 +0000
committerjeff <jeff>2009-03-16 17:06:40 +0000
commitd3784b40552e9f00c9d803ac0833e09828c73d96 (patch)
tree2e1d864d8b24e8d5817f719e79a08a3718acac79
parent72d61f5de9e35ec0a01b62eff696ebbbb830846c (diff)
have prizm use service data rather than package data to select a profile RT#4853
-rw-r--r--FS/FS/Schema.pm1
-rw-r--r--FS/FS/part_export/prizm.pm12
-rw-r--r--httemplate/edit/svc_broadband.cgi3
3 files changed, 12 insertions, 4 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 65f7a7f40..4ffeaa2e8 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1666,6 +1666,7 @@ sub tables_hashref {
'longitude', 'decimal', 'NULL', '', '', '',
'altitude', 'decimal', 'NULL', '', '', '',
'vlan_profile', 'varchar', 'NULL', $char_d, '', '',
+ 'performance_profile', 'varchar', 'NULL', $char_d, '', '',
],
'primary_key' => 'svcnum',
'unique' => [ [ 'mac_addr' ] ],
diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm
index 2d4d8584c..97054408f 100644
--- a/FS/FS/part_export/prizm.pm
+++ b/FS/FS/part_export/prizm.pm
@@ -200,6 +200,9 @@ sub _export_insert {
# }
# }
+ my $performance_profile = $svc->performance_profile;
+ $performance_profile ||= $svc->cust_svc->cust_pkg->part_pkg->pkg;
+
my $element_name_length = 50;
$element_name_length = $1
if $self->option('element_name_length') =~ /^\s*(\d+)\s*$/;
@@ -211,7 +214,7 @@ sub _export_insert {
$location,
$contact,
sprintf("%032X", $svc->authkey),
- $svc->cust_svc->cust_pkg->part_pkg->pkg,
+ $performance_profile,
$svc->vlan_profile,
($self->option('ems') ? 1 : 0 ),
);
@@ -256,7 +259,7 @@ sub _export_insert {
$err_or_som = $self->prizm_command('NetworkIfService', 'setElementConfigSet',
[ $element ],
- $svc->cust_svc->cust_pkg->part_pkg->pkg,
+ $performance_profile,
0,
1,
);
@@ -395,9 +398,12 @@ sub _export_replace {
return $err_or_som
unless ref($err_or_som);
+ my $performance_profile = $new->performance_profile;
+ $performance_profile ||= $new->cust_svc->cust_pkg->part_pkg->pkg;
+
$err_or_som = $self->prizm_command('NetworkIfService', 'setElementConfigSet',
[ $element ],
- $new->cust_svc->cust_pkg->part_pkg->pkg,
+ $performance_profile,
0,
1,
);
diff --git a/httemplate/edit/svc_broadband.cgi b/httemplate/edit/svc_broadband.cgi
index e60c76c90..01e58cdc4 100644
--- a/httemplate/edit/svc_broadband.cgi
+++ b/httemplate/edit/svc_broadband.cgi
@@ -14,6 +14,7 @@
'longitude' => 'Longitude',
'altitude' => 'Altitude',
'vlan_profile' => 'VLAN profile',
+ 'performance_profile' => 'Performance profile',
'authkey' => 'Authentication key',
},
'fields' => \@fields,
@@ -34,7 +35,7 @@ my $conf = new FS::Conf;
my @fields = (
qw( description ip_addr speed_down speed_up blocknum ),
{ field=>'block_label', type=>'fixed' },
- qw( mac_addr latitude longitude altitude vlan_profile authkey )
+ qw( mac_addr latitude longitude altitude vlan_profile performance_profile authkey )
);
my $fixedblock = '';