Bug 18541: (QA follow-up) Fix wrong variable name ($layout_xml vs $print_layout_xml)
[koha.git] / patroncards / create-pdf.pl
index 05cfcbd..6f22049 100755 (executable)
@@ -29,10 +29,10 @@ use autouse 'Data::Dumper' => qw(Dumper);
 
 use C4::Debug;
 use C4::Context;
-use autouse 'C4::Members' => qw(GetMember);
 use C4::Creators;
 use C4::Patroncards;
 use Koha::List::Patron;
+use Koha::Patrons;
 use Koha::Patron::Images;
 
 my $cgi = new CGI;
@@ -135,7 +135,7 @@ foreach my $item (@{$items}) {
 
         $cardscount ++;
         my $borrower_number = $item->{'borrower_number'};
-        my $card_number = GetMember(borrowernumber => $borrower_number)->{'cardnumber'};
+        my $card_number = Koha::Patrons->find( $borrower_number)->cardnumber;
 
 #       Set barcode data
         $print_layout_xml->{'barcode'}->[0]->{'data'} = $card_number if $print_layout_xml->{'barcode'};
@@ -153,6 +153,7 @@ foreach my $item (@{$items}) {
         );
 
         $patron_card->draw_guide_box($pdf) if $print_layout_xml->{'guide_box'};
+        $patron_card->draw_guide_grid($pdf) if $print_layout_xml->{'guide_grid'};
         $patron_card->draw_barcode($pdf) if $print_layout_xml->{'barcode'};
 
 #       Do image foo and place binary image data into layout hash