RT# 83450 - fixed rateplan export
[freeside.git] / FS / FS / part_export / broadband_sqlradius.pm
index 522c637..bf95e23 100644 (file)
@@ -6,16 +6,20 @@ use Tie::IxHash;
 use FS::Conf;
 use FS::Record qw( dbh str2time_sql ); #qsearch qsearchs );
 use FS::part_export::sqlradius qw(sqlradius_connect);
+use FS::Password_Mixin;
 use NEXT;
 
-FS::UID->install_callback(sub { $conf = new FS::Conf });
+FS::UID->install_callback(
+  sub {
+    $conf = new FS::Conf;
+    @pw_set = FS::Password_Mixin->pw_set;
+  }
+);
 
 @ISA = qw(FS::part_export::sqlradius);
 
 $DEBUG = 0;
 
-@pw_set = ( 'a'..'z', 'A'..'Z', '0'..'9', '(', ')', '#', '.', ',' );
-
 tie %options, 'Tie::IxHash',
   'datasrc'  => { label=>'DBI data source ' },
   'username' => { label=>'Database username' },
@@ -24,6 +28,10 @@ tie %options, 'Tie::IxHash',
                   type    => 'select',
                   options => [qw( radusergroup usergroup )],
                 },
+  'ignore_accounting' => {
+    type  => 'checkbox',
+    label => 'Ignore accounting records from this database'
+  },
 # session report doesn't currently know about this export anyway
 #  'hide_ip' => {
 #    type  => 'checkbox',
@@ -129,6 +137,8 @@ sub radius_check_suspended {
 sub _export_suspend {
   my( $self, $svc_broadband ) = (shift, shift);
 
+  return '' if $self->option('skip_provisioning');
+
   local $SIG{HUP} = 'IGNORE';
   local $SIG{INT} = 'IGNORE';
   local $SIG{QUIT} = 'IGNORE';