. is used in some implementations of classic crypt
[freeside.git] / FS / FS / cdr.pm
index 8b09e4e..79a687e 100644 (file)
@@ -246,14 +246,16 @@ sub check {
   my $error =
        $self->ut_numbern('acctid')
 
-    #Usage = 1, S&E = 7, OC&C = 8
-    || $self->ut_foreign_keyn('cdrtypenum',  'cdr_type',     'cdrtypenum' )
-
-    #the big list in appendix 2
-    || $self->ut_foreign_keyn('calltypenum', 'cdr_calltype', 'calltypenum' )
-
-    # Telstra =1, Optus = 2, RSL COM = 3
-    || $self->ut_foreign_keyn('carrierid', 'cdr_carrier', 'carrierid' )
+  #add a config option to turn these back on if someone needs 'em
+  #
+  #  #Usage = 1, S&E = 7, OC&C = 8
+  #  || $self->ut_foreign_keyn('cdrtypenum',  'cdr_type',     'cdrtypenum' )
+  #
+  #  #the big list in appendix 2
+  #  || $self->ut_foreign_keyn('calltypenum', 'cdr_calltype', 'calltypenum' )
+  #
+  #  # Telstra =1, Optus = 2, RSL COM = 3
+  #  || $self->ut_foreign_keyn('carrierid', 'cdr_carrier', 'carrierid' )
   ;
   return $error if $error;
 
@@ -633,7 +635,11 @@ sub batch_import {
   if ( $type eq 'csv' ) {
     eval "use Text::CSV_XS;";
     die $@ if $@;
-    $parser = new Text::CSV_XS;
+    my %attr = ();
+    foreach ( grep exists($info->{$_}), qw( sep_char ) ) {
+      $attr{$_} = $info->{$_};
+    }
+    $parser = new Text::CSV_XS \%attr;
   } elsif ( $type eq 'fixedlength' ) {
     eval "use Parse::FixedLength;";
     die $@ if $@;