diff options
| author | mark <mark> | 2011-07-30 23:14:23 +0000 |
|---|---|---|
| committer | mark <mark> | 2011-07-30 23:14:23 +0000 |
| commit | 197e19d52c02f541850ca06f2628d86c2c3b9464 (patch) | |
| tree | e2a502a9a360a861abfa9bb63045bf7d8221d1db /FS/FS | |
| parent | 1b0cab3641a1cc3d497cbe4502dc3b33b13af74d (diff) | |
rearrange flow of batch download, #947
Diffstat (limited to 'FS/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; |
