From 2e6f91dc71f249bbb4f703d424e0c0a20f711adb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Sat, 3 Jul 2010 16:32:44 +0200 Subject: [PATCH] Bug 4188 Valid PDF file name when printing basket group with no name Signed-off-by: Galen Charlton --- acqui/basketgroup.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index a3b7dc940c..69de0990dc 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -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; -- 2.39.5