X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fbill_batch.pm;h=7300f45871f498882492098f1f3cd75ae931fa05;hb=873ec8e0528b7a944aec88936538fe9a04cd0b3f;hp=3afe20915907f3b294e70ea93c6445cff14e3c22;hpb=b1c1559dec0570bc401ccd0e29e66a9bf6f151e1;p=freeside.git diff --git a/FS/FS/bill_batch.pm b/FS/FS/bill_batch.pm index 3afe20915..7300f4587 100644 --- a/FS/FS/bill_batch.pm +++ b/FS/FS/bill_batch.pm @@ -80,6 +80,7 @@ sub print_pdf { die $error if $error; } } + $job->update_statustext(100, 'Combining invoices') if $job; return $pdf_out->toPDF; } @@ -128,6 +129,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;