summaryrefslogtreecommitdiff
path: root/httemplate/misc/download-bill_batch.html
diff options
context:
space:
mode:
authormark <mark>2011-08-16 02:09:44 +0000
committermark <mark>2011-08-16 02:09:44 +0000
commitdaf98ce13817230ffb103daf413190da3ed0f217 (patch)
treee12fee32dd7f7d748e68286656081ac5b72c3a68 /httemplate/misc/download-bill_batch.html
parentacab2d3793a1906adc905bccf9dc71d96f9eb096 (diff)
reliably start batch download, #947
Diffstat (limited to 'httemplate/misc/download-bill_batch.html')
-rw-r--r--httemplate/misc/download-bill_batch.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/httemplate/misc/download-bill_batch.html b/httemplate/misc/download-bill_batch.html
index 00d9236f3..9b5f1efa8 100644
--- a/httemplate/misc/download-bill_batch.html
+++ b/httemplate/misc/download-bill_batch.html
@@ -12,6 +12,12 @@ $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('');