X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-cdr-a2billing-import;h=a8469e744d40c637d4abc3bba7ceaad14fd7b550;hb=1e5fd09bc50a0aa7d5e926f44243cb00a153f687;hp=923f5fbb13ad43585d77a233757f803102f6e04b;hpb=1156af3a7ca02d40d622a9fe6df899fc74b3e622;p=freeside.git diff --git a/FS/bin/freeside-cdr-a2billing-import b/FS/bin/freeside-cdr-a2billing-import index 923f5fbb1..a8469e744 100755 --- a/FS/bin/freeside-cdr-a2billing-import +++ b/FS/bin/freeside-cdr-a2billing-import @@ -91,7 +91,7 @@ my %disposition = ( ); my @cols = ( - 'cc_call.id as id', 'cc_card.username as username', + "$table.id as id", 'cc_card.username as username', qw( sessionid starttime stoptime sessiontime real_sessiontime terminatecauseid @@ -101,6 +101,7 @@ my @cols = ( ); my $sql = 'SELECT '.join(',', @cols). " FROM $table". + " LEFT JOIN cc_card ON ( $table.card_id = cc_card.id ) ". ' WHERE freesidestatus IS NULL' . ($start && " AND starttime >= '$start'") . ($end && " AND starttime < '$end'") ;