Bug 11856: Add publication year and edition to French acq PDF template
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 27 Feb 2014 15:30:29 +0000 (16:30 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 28 Apr 2014 17:20:14 +0000 (17:20 +0000)
Follow up to the patch for the English templates - repeat tests
with OrderPDFFormat set to pdfformat::layout3pagesfr.

Additional change:
Translates 'published by' to 'publie par'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

acqui/pdfformat/layout3pagesfr.pm

index 1fdd319..f3bb1d8 100644 (file)
@@ -107,10 +107,32 @@ sub printorders {
             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} ? ' publiĆ© par '. $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} ? '  publiĆ© par '. $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}),