X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=fb83faa3fec411e1cd1a647e6a338ed35f6701ee;hp=e23699cce8f5f2855eb1870ccfc6a868c6ee9c9d;hb=da86d5a8af2f915a340a74f6c97772451a1e23ef;hpb=2fcf7ebdbdcc55890fdbebb239396fdabc15d905 diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index e23699cce..fb83faa3f 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1593,6 +1593,7 @@ sub process_batch_import { params => { map { $_ => $param->{$_} } @pass_params }, #? default_csv => $opt->{default_csv}, + postinsert_callback => $opt->{postinsert_callback}, ); if ( $opt->{'batch_namecol'} ) { @@ -1666,6 +1667,8 @@ sub batch_import { my( $type, $header, $sep_char, $fixedlength_format, $xml_format, $row_callback, @fields ); my $postinsert_callback = ''; + $postinsert_callback = $param->{'postinsert_callback'} + if $param->{'postinsert_callback'}; if ( $param->{'format'} ) { my $format = $param->{'format'}; @@ -1711,9 +1714,6 @@ sub batch_import { $row_callback = ''; @fields = @{ $param->{'fields'} }; - $postinsert_callback = $param->{'postinsert_callback'} - if $param->{'postinsert_callback'} - } else { die "neither format nor fields specified"; }