Bug 4188 Valid PDF file name when printing basket group with no name

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
Frédéric Demians 2010-07-03 16:32:44 +02:00 committed by Galen Charlton
parent d4f6974581
commit 2e6f91dc71
1 changed files with 4 additions and 1 deletions

View File

@ -238,7 +238,10 @@ sub printbasketgrouppdf{
}
$orders{$basket->{basketno}}=\@ba_orders;
}
print $input->header( -type => 'application/pdf', -attachment => $basketgroup->{name}.'.pdf' );
print $input->header(
-type => 'application/pdf',
-attachment => ( $basketgroup->{name} || $basketgroupid ) . '.pdf'
);
my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} || C4::Context->preference("gist")) || die "pdf generation failed";
print $pdf;
exit;