From: Katrin Fischer <[email protected]> PDF print of basket groups is broken.
To test: 1) Make sure OrderPdfFormat is set to pdfformat::layout2pages or pdfformat::layout3pages 2) Create a basket with orders 3) Close the basket and create a basket group checking the checkbox 4) Print the basket group as PDF Before patch the file is broken and when opened in an editor contains an error message. After the patch the PDF should be generated correctly again. Thx to Chris for helping me to fix the problem. Signed-off-by: Chris Cormack <[email protected]> Signed-off-by: Marcel de Rooy <[email protected]> Combined require and import into use. Added a warn statement. --- acqui/basketgroup.pl | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index fbcad0f..46d49d9 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -186,12 +186,8 @@ sub printbasketgrouppdf{ my $pdfformat = C4::Context->preference("OrderPdfFormat"); if ($pdfformat eq 'pdfformat::layout3pages' || $pdfformat eq 'pdfformat::layout2pages'){ - eval { - require $pdfformat; - import $pdfformat; - }; - if ($@){ - } + eval "use $pdfformat"; + warn "Error while loading pdfformat module: $@" if $@; } else { print $input->header; -- 1.6.0.6 _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
