X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fdownload-bill_batch.html;h=9b5f1efa8bf3ce557cee366ef7b797efa761f32d;hb=35540b0694faa387546391a3e5f8d67b17244188;hp=70e3003ce7b7e2f13b2788f7d7f9ccc33cc43541;hpb=197e19d52c02f541850ca06f2628d86c2c3b9464;p=freeside.git diff --git a/httemplate/misc/download-bill_batch.html b/httemplate/misc/download-bill_batch.html index 70e3003ce..9b5f1efa8 100644 --- a/httemplate/misc/download-bill_batch.html +++ b/httemplate/misc/download-bill_batch.html @@ -12,10 +12,15 @@ $m->clear_buffer; $r->content_type('application/pdf'); $r->headers_out->add( 'Content-Disposition' => 'attachment;filename="invoice_batch_'.$batchnum.'.pdf"'); +my $cookie = CGI::Cookie->new( + -name => "bill_batch_download", + -value => $batchnum, + -expires => '+1d', +); +$r->headers_out->add( 'Set-Cookie' => $cookie->as_string ); $m->print($content); -#$batch->pdf(''); -#my $error = $batch->replace; -# warn "error deleting cached PDF: '$error'\n" if $error; -#} +$batch->pdf(''); +my $error = $batch->replace; +warn "error deleting cached PDF: '$error'\n" if $error;