From e62ffd49b05ad0e214e361150269b2a83794b0c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Andr=C3=A9=20Santoni?= Date: Wed, 29 Jul 2009 17:22:22 +0200 Subject: [PATCH] This adds the Editor Number in the PDF (basketgrouping) --- acqui/basketgroup.pl | 12 ++++++++++++ acqui/pdfformat/example.pm | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) 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); } -- 2.39.5