projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
FS
/
FS
/
Record.pm
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
252b760
..
d244013
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-1618,6
+1618,7
@@
sub batch_import {
my $count;
my $parser;
my @buffer = ();
my $count;
my $parser;
my @buffer = ();
+ my $asn_header_buffer;
if ( $type eq 'csv' || $type eq 'fixedlength' ) {
if ( $type eq 'csv' ) {
if ( $type eq 'csv' || $type eq 'fixedlength' ) {
if ( $type eq 'csv' ) {
@@
-1692,6
+1693,8
@@
sub batch_import {
my $asn_output = $parser->decode( $data )
or die "No ". $asn_format->{'macro'}. " found\n";
my $asn_output = $parser->decode( $data )
or die "No ". $asn_format->{'macro'}. " found\n";
+ $asn_header_buffer = &{ $asn_format->{'header_buffer'} }( $asn_output );
+
my $rows = &{ $asn_format->{'arrayref'} }( $asn_output );
$count = @buffer = @$rows;
my $rows = &{ $asn_format->{'arrayref'} }( $asn_output );
$count = @buffer = @$rows;
@@
-1786,7
+1789,7
@@
sub batch_import {
last unless scalar(@buffer);
my $row = shift @buffer;
foreach my $key ( keys %{ $asn_format->{map} } ) {
last unless scalar(@buffer);
my $row = shift @buffer;
foreach my $key ( keys %{ $asn_format->{map} } ) {
- $hash{$key} = &{ $asn_format->{map}{$key} }( $row );
+ $hash{$key} = &{ $asn_format->{map}{$key} }( $row
, $asn_header_buffer
);
}
} else {
}
} else {