X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=ffeabcb17e1b011f9d3df5c38d1f0a0ffb7a1c2d;hp=3511fe7f018edcd71f015e3f513974fe9e0daded;hb=7f4e4fddb595f5c825a18c88ed79029160650dc9;hpb=811c95da18776232da103fd445e2def019f98d5b diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 3511fe7f0..ffeabcb17 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1853,10 +1853,12 @@ sub batch_import { next if $line =~ /^\s*$/; #skip empty lines $line = &{$row_callback}($line) if $row_callback; + + next if $line =~ /^\s*$/; #skip empty lines $parser->parse($line) or do { $dbh->rollback if $oldAutoCommit; - return "can't parse: ". $parser->error_input(); + return "can't parse: ". $parser->error_input() . " " . $parser->error_diag; }; @columns = $parser->fields(); @@ -1925,7 +1927,7 @@ sub batch_import { next if exists( $param->{skiprow} ); if ( $preinsert_callback ) { - my $error = &{$postinsert_callback}($record, $param); + my $error = &{$preinsert_callback}($record, $param); if ( $error ) { $dbh->rollback if $oldAutoCommit; return "preinsert_callback error". ( $line ? " for $line" : '' ).