X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcdr%2FImport.pm;h=a97472e7a62cb0213b903d7d66af48991144a35b;hp=ca6ae936c136c983de5c275bf2abb2b7f0a285c9;hb=507f1809a908cf738252be86bd444253787302b7;hpb=1d050e512416494a9f3efe232ec19ccf18b7b9af

diff --git a/FS/FS/cdr/Import.pm b/FS/FS/cdr/Import.pm
index ca6ae936c..a97472e7a 100644
--- a/FS/FS/cdr/Import.pm
+++ b/FS/FS/cdr/Import.pm
@@ -81,7 +81,7 @@ sub dbi_import {
   #      )
 
   #my @cols = values %{ $args{column_map} };
-  my $sql = "SELECT * FROM $table "; # join(',', @cols). " FROM $table ".
+  my $sql = "SELECT $table.* FROM $table "; # join(',', @cols). " FROM $table ".
   $sql .=  'LEFT JOIN '. $args{status_table}.
            " ON ( $table.$pkey = ". $args{status_table}. ".$pkey )"
     if $args{status_table};
@@ -117,8 +117,7 @@ sub dbi_import {
 
     $cdr->cdrtypenum($opt{c}) if $opt{c};
 
-    my $pkey_value = $args{status_table} ? $row->{"$table.$pkey"}
-                                         : $row->{$pkey};
+    my $pkey_value = $row->{$pkey};
 
     #print "$pkey_value\n" if $opt{v};
     my $error = $cdr->insert;