X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpay_batch.pm;h=6a27554945c9eb6d65e592360f060d34c4731e7a;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=d73c052938238b4a8d6333efb59a6b1a486d1a10;hpb=e37126c4d8a3eea4d27c855733a77cba026565c4;p=freeside.git diff --git a/FS/FS/pay_batch.pm b/FS/FS/pay_batch.pm index d73c05293..6a2755494 100644 --- a/FS/FS/pay_batch.pm +++ b/FS/FS/pay_batch.pm @@ -195,9 +195,6 @@ sub import_results { my $info = $import_info{$format} or die "unknown format $format"; - my $job = $param->{'job'}; - $job->update_statustext(0) if $job; - my $filetype = $info->{'filetype'}; # CSV or fixed my @fields = @{ $info->{'fields'}}; my $formatre = $info->{'formatre'}; # for fixed @@ -289,12 +286,7 @@ sub import_results { } } - my $num = 0; foreach (@all_values) { - if($job) { - $num++; - $job->update_statustext(int(100 * $num/scalar(@all_values))); - } my @values = @$_; my %hash; @@ -412,29 +404,6 @@ sub import_results { } -use MIME::Base64; -use Storable 'thaw'; -use Data::Dumper; -sub process_import_results { - my $job = shift; - my $param = thaw(decode_base64(shift)); - $param->{'job'} = $job; - warn Dumper($param) if $DEBUG; - my $batchnum = delete $param->{'batchnum'} or die "no batchnum specified\n"; - my $batch = FS::pay_batch->by_key($batchnum) or die "batchnum '$batchnum' not found\n"; - - my $file = $param->{'uploaded_files'} or die "no files provided\n"; - $file =~ s/^(\w+):([\.\w]+)$/$2/; - my $dir = '%%%FREESIDE_CACHE%%%/cache.' . $FS::UID::datasrc; - open( $param->{'filehandle'}, - '<', - "$dir/$file" ) - or die "unable to open '$file'.\n"; - my $error = $batch->import_results($param); - unlink $file; - die $error if $error; -} - # Formerly httemplate/misc/download-batch.cgi sub export_batch { my $self = shift;