summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authormark <mark>2011-07-13 08:11:00 +0000
committermark <mark>2011-07-13 08:11:00 +0000
commit79ca08ffa158d20736d0d5807375e70f69b166f0 (patch)
tree6d5f947393dbacb2a59a386bbc8c077175d258f7 /httemplate/view
parent5f7fe6b10990eee2d1e8a9608cfd2bb656912477 (diff)
fix invoice batch download, #13461
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/bill_batch.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/httemplate/view/bill_batch.cgi b/httemplate/view/bill_batch.cgi
index cfd44fe50..c848664ac 100644
--- a/httemplate/view/bill_batch.cgi
+++ b/httemplate/view/bill_batch.cgi
@@ -1,11 +1,13 @@
% if($magic eq 'download') {
-% $m->clear_buffer;
-% $r->content_type('application/pdf');
-% $r->headers_out->add('Content-Disposition' => 'attachment;filename="invoice_batch_'.$batchnum.'.pdf"');
-<% $batch->pdf %>
+% my $content = $batch->pdf;
% $batch->pdf('');
% my $error = $batch->replace;
% warn "error deleting cached PDF: '$error'\n" if $error;
+%
+% $m->clear_buffer;
+% $r->content_type('application/pdf');
+% $r->headers_out->add('Content-Disposition' => 'attachment;filename="invoice_batch_'.$batchnum.'.pdf"');
+<% $content %>
% }
%
% elsif ($magic eq 'download_popup') {