From 9cf3f14594a0c9af5f99463d4774836c0b7934fa Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 5 Apr 2011 22:41:59 +0200 Subject: [PATCH] BZ6075: problem in pdf and columns alignment When some fields are empty, the table is wrongly set : the empty columns are not set, thus the column don't contains what they are supposed to contain --- acqui/basketgroup.pl | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 457b616..a92d730 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -211,19 +211,18 @@ sub printbasketgrouppdf{ } else { push(@ba_order, undef); } - if ($ord->{itemtype}){ - push(@ba_order, $itemtypes->{$bib->{itemtype}}->{description}) if $bib->{itemtype}; + if ($ord->{itemtype} and $bib->{itemtype}){ + push(@ba_order, $itemtypes->{$bib->{itemtype}}->{description}); } else { push(@ba_order, undef); } # } else { # push(@ba_order, undef, undef); for my $key (qw/author title publishercode quantity listprice ecost/) { - push(@ba_order, $ord->{$key}); #Order lines + push(@ba_order, ($ord->{$key} || undef )); #Order lines } - push(@ba_order, $bookseller->{discount}); + push(@ba_order, $bookseller->{discount} || undef ); push(@ba_order, $bookseller->{gstrate}*100 // C4::Context->preference("gist") // 0); - push(@ba_orders, \@ba_order); # Editor Number my $en; if (C4::Context->preference("marcflavour") eq 'UNIMARC') { @@ -236,6 +235,7 @@ sub printbasketgrouppdf{ } else { push(@ba_order, undef); } + push( @ba_orders, \@ba_order ); } } $orders{$basket->{basketno}}=\@ba_orders; -- 1.7.1