summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-06-30 17:09:47 -0700
committerIvan Kohler <ivan@freeside.biz>2014-06-30 17:09:47 -0700
commit3c4b8a30aa8b650795b6f74c587f57feab348ab6 (patch)
tree751e96ac3ee5fb6b9180dd7bf5b92db7c03266fe
parent9479931dfcf854e6b783dc6b38c19a1875b18c2b (diff)
use a separate table for freesidestatus for IVR imports, RT#39055
-rw-r--r--FS/FS/cdr/Import.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/FS/FS/cdr/Import.pm b/FS/FS/cdr/Import.pm
index e788712c4..ca6ae936c 100644
--- a/FS/FS/cdr/Import.pm
+++ b/FS/FS/cdr/Import.pm
@@ -117,13 +117,16 @@ sub dbi_import {
$cdr->cdrtypenum($opt{c}) if $opt{c};
- #print $row->{$pkey},"\n" if $opt{v};
+ my $pkey_value = $args{status_table} ? $row->{"$table.$pkey"}
+ : $row->{$pkey};
+
+ #print "$pkey_value\n" if $opt{v};
my $error = $cdr->insert;
if ($error) {
- #die $row->{$pkey} . ": failed import: $error\n";
- print $row->{$pkey} . ": failed import: $error\n";
+ #die "$pkey_value: failed import: $error\n";
+ print "$pkey_value: failed import: $error\n";
} else {
@@ -142,7 +145,7 @@ sub dbi_import {
}
- my $updated = $dbi->do($st_sql, undef, $row->{$pkey} );
+ my $updated = $dbi->do($st_sql, undef, $pkey_value );
#$updates += $updated;
die "failed to set status: ".$dbi->errstr."\n" unless $updated;