diff options
author | mark <mark> | 2011-07-30 23:13:40 +0000 |
---|---|---|
committer | mark <mark> | 2011-07-30 23:13:40 +0000 |
commit | 007fd3026ade508a9d88b436575a4797d003280a (patch) | |
tree | c82742a1cfb9c425041958dc805b45a76a81a290 /FS | |
parent | 8043c7dc35455c0c2a7afce70e9f79448952d170 (diff) |
rearrange flow of batch download, #947
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/bill_batch.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/bill_batch.pm b/FS/FS/bill_batch.pm index ec5c19456..1a46db0b2 100644 --- a/FS/FS/bill_batch.pm +++ b/FS/FS/bill_batch.pm @@ -84,6 +84,7 @@ sub print_pdf { die $error if $error; } } + $job->update_statustext(100, 'Combining invoices') if $job; return $pdf_out->toPDF; } @@ -144,6 +145,11 @@ sub process_print_pdf { my $batch = FS::bill_batch->by_key($param->{batchnum}); die "batch '$param->{batchnum}' not found!\n" if !$batch; + if ( $param->{'close'} ) { + my $error = $batch->close; + die $error if $error; + } + my $pdf = $batch->print_pdf($job); $batch->pdf($pdf); my $error = $batch->replace; |