projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rearrange flow of batch download, #947
[freeside.git]
/
FS
/
FS
/
bill_batch.pm
diff --git
a/FS/FS/bill_batch.pm
b/FS/FS/bill_batch.pm
index
3afe209
..
7300f45
100644
(file)
--- a/
FS/FS/bill_batch.pm
+++ b/
FS/FS/bill_batch.pm
@@
-80,6
+80,7
@@
sub print_pdf {
die $error if $error;
}
}
die $error if $error;
}
}
+ $job->update_statustext(100, 'Combining invoices') if $job;
return $pdf_out->toPDF;
}
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;
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;
my $pdf = $batch->print_pdf($job);
$batch->pdf($pdf);
my $error = $batch->replace;