projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
selfservice priority sort order, #14029
[freeside.git]
/
httemplate
/
misc
/
download-bill_batch.html
diff --git
a/httemplate/misc/download-bill_batch.html
b/httemplate/misc/download-bill_batch.html
index
70e3003
..
9b5f1ef
100644
(file)
--- 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"');
$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);
$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;
</%init>
</%init>