Bug 5356: Followup: Add basket billing and delivery place on export pdf (layout3pages)
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 4 Sep 2012 08:03:27 +0000 (10:03 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 24 Sep 2012 18:46:42 +0000 (20:46 +0200)
acqui/pdfformat/layout3pages.pm

index 324b88e..0f1f14a 100644 (file)
@@ -29,7 +29,7 @@ use strict;
 use warnings;
 use utf8;
 
-use C4::Branch qw(GetBranchDetail);
+use C4::Branch qw(GetBranchDetail GetBranchName);
 
 BEGIN {
          use Exporter   ();
@@ -92,7 +92,12 @@ sub printorders {
         $text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm );
         $text->translate(20/mm,  ($height-15)/mm);
         $text->text("Order N°".$basketgroup->{'id'}.". Basket N° ".$basket->{basketno}.". ".$basket->{booksellernote});
-        
+        $text->translate(20/mm,  ($height-20)/mm);
+        $text->text( ( $basket->{billingplace} ? "Billing at " . C4::Branch::GetBranchName( $basket->{billingplace} ) : "" )
+            . ( $basket->{billingplace} and $basket->{deliveryplace} ? " and " : "" )
+            . ( $basket->{deliveryplace} ? "delivery at " . C4::Branch::GetBranchName( $basket->{deliveryplace}) : "" )
+        );
+
         my $pdftable = new PDF::Table();
         my $abaskets;
         my $arrbasket;