From d8d9e7fdb80185d08f2c5c04bf2cf6836245178e Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 4 Feb 2010 16:25:31 -0500 Subject: [PATCH] Bugfix: Correcting hash dereferencing for barcode data This patch corrects hash dereferencing syntax. Signed-off-by: Galen Charlton --- C4/Patroncards/Patroncard.pm | 10 +++++----- patroncards/create-pdf.pl | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/Patroncards/Patroncard.pm b/C4/Patroncards/Patroncard.pm index 7e3ed359fc..595dfd1b5c 100644 --- a/C4/Patroncards/Patroncard.pm +++ b/C4/Patroncards/Patroncard.pm @@ -56,13 +56,13 @@ sub draw_barcode { my $barcode_width = 0.8 * $self->{'width'}; # this scales the barcode width to 80% of the label width my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 1% of the label height _draw_barcode( $self, - llx => $self->{'llx'} + $self->{'layout'}->{'barcode'}->{'llx'}, - lly => $self->{'lly'} + $self->{'layout'}->{'barcode'}->{'lly'}, + llx => $self->{'llx'} + $self->{'layout'}->{'barcode'}->[0]->{'llx'}, + lly => $self->{'lly'} + $self->{'layout'}->{'barcode'}->[0]->{'lly'}, width => $barcode_width, y_scale_factor => $barcode_y_scale_factor, - barcode_type => $self->{'layout'}->{'barcode'}->{'type'}, - barcode_data => $self->{'layout'}->{'barcode'}->{'data'}, - text => $self->{'layout'}->{'barcode'}->{'text_print'}, + barcode_type => $self->{'layout'}->{'barcode'}->[0]->{'type'}, + barcode_data => $self->{'layout'}->{'barcode'}->[0]->{'data'}, + text => $self->{'layout'}->{'barcode'}->[0]->{'text_print'}, ); } diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index 04b1684e24..830334dc6f 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -110,7 +110,7 @@ foreach my $item (@{$items}) { my $card_number = GetMember(borrowernumber => $borrower_number)->{'cardnumber'}; # Set barcode data - $layout_xml->{'barcode'}->{'data'} = $card_number if $layout_xml->{'barcode'}; + $layout_xml->{'barcode'}->[0]->{'data'} = $card_number if $layout_xml->{'barcode'}; # Create a new patroncard object my $patron_card = C4::Patroncards::Patroncard->new( -- 2.39.5