X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fbill_batch.cgi;h=c848664ac9f23668a763bf22147e0854d237a880;hp=cfd44fe508ce1adaa67a0f33b1faf7166b942f8e;hb=ea79c3b7eff3f274d9d7f923891853a72cc1474f;hpb=077bb34b3467c3320440c49b76064f664c0eee98 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') {