add option to limit automatic unsuspensions to a specific suspension reason type...
[freeside.git] / FS / FS / part_pkg / voip_cdr.pm
index d96c472..587a8c5 100644 (file)
@@ -65,7 +65,7 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash',
 ;
 
 %info = (
-  'name' => 'VoIP rating by plan of CDR records in an internal (or external) SQL table',
+  'name' => 'VoIP rating by plan of CDR records',
   'shortname' => 'VoIP/telco CDR rating (standard)',
   'inherit_fields' => [ 'prorate_Mixin', 'global_Mixin' ],
   'fields' => {
@@ -360,6 +360,13 @@ tie my %accountcode_tollfree_field, 'Tie::IxHash',
                      )
                   ],
   'weight' => 41,
+  'validate' => sub {
+    # Validation function for FS::part_pkg::check_options()
+    my $options = shift;
+    return "Please choose a Rate Plan for use with selected Rating Method"
+      if $options->{rating_method} eq 'prefix' &&  !$options->{ratenum};
+    return;
+  },
 );
 
 sub price_info {
@@ -724,4 +731,3 @@ sub hide_svc_detail {
 
 
 1;
-