projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9479931
)
use a separate table for freesidestatus for IVR imports, RT#39055
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 1 Jul 2014 00:09:47 +0000
(17:09 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 1 Jul 2014 00:09:47 +0000
(17:09 -0700)
FS/FS/cdr/Import.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cdr/Import.pm
b/FS/FS/cdr/Import.pm
index
e788712
..
ca6ae93
100644
(file)
--- 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};
$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) {
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 {
} 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;
#$updates += $updated;
die "failed to set status: ".$dbi->errstr."\n" unless $updated;