From: Jean-André Santoni Date: Wed, 29 Jul 2009 15:22:22 +0000 (+0200) Subject: This adds the Editor Number in the PDF (basketgrouping) X-Git-Tag: v3.02.00-alpha~54^2~284 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=e62ffd49b05ad0e214e361150269b2a83794b0c4;p=koha_gimpoz This adds the Editor Number in the PDF (basketgrouping) --- diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 56526e7042..12db2cf79f 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -288,6 +288,18 @@ if (! $op ) { push(@ba_order, $bookseller->{discount}); 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') { + $en = MARC::Record::new_from_xml($ord->{marcxml},'UTF-8')->subfield('345',"b"); + } elsif (C4::Context->preference("marcflavour") eq 'MARC21') { + $en = MARC::Record::new_from_xml($ord->{marcxml},'UTF-8')->subfield('037',"a"); + } + if($en){ + push(@ba_order, $en); + } else { + push(@ba_order, undef); + } } } %orders->{$basket->{basketno}}=\@ba_orders; diff --git a/acqui/pdfformat/example.pm b/acqui/pdfformat/example.pm index 9266a21c07..6a5f29283a 100644 --- a/acqui/pdfformat/example.pm +++ b/acqui/pdfformat/example.pm @@ -101,7 +101,7 @@ sub printorders { # @{$orders->{$basket->{basketno}}}); foreach my $line (@{$orders->{$basket->{basketno}}}) { $arrbasket = undef; - push(@$arrbasket, @$line[3]." / ".@$line[2].(@$line[0]?" ISBN : ".@$line[0]:'').", ".@$line[1].(@$line[4]?' publié par '.@$line[4]:''), @$line[5],$num->format_price(@$line[6]),$num->format_price(@$line[8]).'%',$num->format_price(@$line[7]/(1+@$line[9]/100)),$num->format_price(@$line[9]).'%',$num->format_price($num->round(@$line[7])*@$line[5])); + push(@$arrbasket, @$line[3]." / ".@$line[2].(@$line[0]?" ISBN : ".@$line[0]:'').(@$line[10]?" EN : ".@$line[10]:'').", ".@$line[1].(@$line[4]?' publié par '.@$line[4]:''), @$line[5],$num->format_price(@$line[6]),$num->format_price(@$line[8]).'%',$num->format_price(@$line[7]/(1+@$line[9]/100)),$num->format_price(@$line[9]).'%',$num->format_price($num->round(@$line[7])*@$line[5])); push(@$abaskets, $arrbasket); }