# Editor Number
my $en;
+ my $edition;
my $marcrecord=eval{MARC::Record::new_from_xml( $ord->{marcxml},'UTF-8' )};
if ($marcrecord){
if ( C4::Context->preference("marcflavour") eq 'UNIMARC' ) {
$en = $marcrecord->subfield( '345', "b" );
+ $edition = $marcrecord->subfield( '205', 'a' );
} elsif ( C4::Context->preference("marcflavour") eq 'MARC21' ) {
$en = $marcrecord->subfield( '037', "a" );
+ $edition = $marcrecord->subfield( '250', 'a' );
}
}
isbn => ($ord->{isbn} ? $ord->{isbn} : undef),
itemtype => ( $ord->{itemtype} and $bib->{itemtype} ? $itemtypes->{$bib->{itemtype}}->{description} : undef ),
en => ( $en ? $en : undef ),
+ edition => ( $edition ? $edition : undef ),
};
- for my $key ( qw/ gstrate author title itemtype publishercode discount quantity rrpgsti rrpgste gstgsti gstgste ecostgsti ecostgste gstvalue totalgste totalgsti / ) {
+ for my $key ( qw/ gstrate author title itemtype publishercode copyrightdate publicationyear discount quantity rrpgsti rrpgste gstgsti gstgste ecostgsti ecostgste gstvalue totalgste totalgsti / ) {
$ba_order->{$key} = $ord->{$key};
}
}
push(@$abaskets, $arrbasket);
+ my $titleinfo;
for my $basket (@$baskets){
for my $line (@{$orders->{$basket->{basketno}}}) {
$arrbasket = undef;
+ $titleinfo = "";
+ if ( C4::Context->preference("marcflavour") eq 'UNIMARC' ) {
+ $titleinfo = $line->{title} . " / " . $line->{author} .
+ ( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
+ ( $line->{en} ? " EN: " . $line->{en} : '' ) .
+ ( $line->{itemtype} ? ", " . $line->{itemtype} : '' ) .
+ ( $line->{edition} ? ", " . $line->{edition} : '' ) .
+ ( $line->{publishercode} ? ' published by '. $line->{publishercode} : '') .
+ ( $line->{publicationyear} ? ', '. $line->{publicationyear} : '');
+ }
+ else { # MARC21, NORMARC
+ $titleinfo = $line->{title} . " " . $line->{author} .
+ ( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
+ ( $line->{en} ? " EN: " . $line->{en} : '' ) .
+ ( $line->{itemtype} ? " " . $line->{itemtype} : '' ) .
+ ( $line->{edition} ? ", " . $line->{edition} : '' ) .
+ ( $line->{publishercode} ? ' published by '. $line->{publishercode} : '') .
+ ( $line->{copyrightdate} ? ' '. $line->{copyrightdate} : '');
+ }
push( @$arrbasket,
$basket->{basketno},
- $line->{title} . " / " . $line->{author} . ( $line->{isbn} ? " ISBN : " . $line->{isbn} : '' ) . ( $line->{en} ? " EN : " . $line->{en} : '' ) . ", " . $line->{itemtype} . ( $line->{publishercode} ? ' published by '. $line->{publishercode} : ""),
+ $titleinfo,
$line->{quantity},
$num->format_price($line->{rrpgsti}),
$num->format_price($line->{discount}).'%',
push(@$arrbasket, $bkey);
}
push(@$abaskets, $arrbasket);
+
+ my $titleinfo;
foreach my $line (@{$orders->{$basket->{basketno}}}) {
$arrbasket = undef;
+ $titleinfo = "";
+ if ( C4::Context->preference("marcflavour") eq 'UNIMARC' ) {
+ $titleinfo = $line->{title} . " / " . $line->{author} .
+ ( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
+ ( $line->{en} ? " EN: " . $line->{en} : '' ) .
+ ( $line->{itemtype} ? ", " . $line->{itemtype} : '' ) .
+ ( $line->{edition} ? ", " . $line->{edition} : '' ) .
+ ( $line->{publishercode} ? ' published by '. $line->{publishercode} : '') .
+ ( $line->{publicationyear} ? ', '. $line->{publicationyear} : '');
+ }
+ else { # MARC21, NORMARC
+ $titleinfo = $line->{title} . " " . $line->{author} .
+ ( $line->{isbn} ? " ISBN: " . $line->{isbn} : '' ) .
+ ( $line->{en} ? " EN: " . $line->{en} : '' ) .
+ ( $line->{itemtype} ? " " . $line->{itemtype} : '' ) .
+ ( $line->{edition} ? ", " . $line->{edition} : '' ) .
+ ( $line->{publishercode} ? ' published by '. $line->{publishercode} : '') .
+ ( $line->{copyrightdate} ? ' '. $line->{copyrightdate} : '');
+ }
push( @$arrbasket,
- $line->{title} . " / " . $line->{author} . ( $line->{isbn} ? " ISBN : " . $line->{isbn} : '' ) . ( $line->{en} ? " EN : " . $line->{en} : '' ) . ", " . $line->{itemtype} . ( $line->{publishercode} ? ' published by '. $line->{publishercode} : ""),
+ $titleinfo,
$line->{quantity},
$num->format_price($line->{rrpgste}),
$num->format_price($line->{rrpgsti}),