debug => 1,
});
+my $op = $input->param('op') || '';
if ($input->param('cardnumber')) {
$cardnumber = $input->param('cardnumber');
$data = GetMember(cardnumber => $cardnumber);
my $order = 'date_due desc';
my $limit = 0;
-my $issues = GetAllIssues($borrowernumber,$order,$limit);
+my $issues = ();
+# Do not request the old issues of anonymous patron
+if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){
+ # use of 'eq' in the above comparison is intentional -- the
+ # system preference value could be blank
+ $template->param( is_anonymous => 1 );
+} else {
+ $issues = GetAllIssues($borrowernumber,$order,$limit);
+}
my $branches = GetBranches();
foreach my $issue ( @{$issues} ) {
}
# barcode export
-if ( $input->param('op') eq 'export_barcodes' ) {
+if ( $op eq 'export_barcodes' ) {
my $today = C4::Dates->new();
$today = $today->output('iso');
my @barcodes =
}
-my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
+my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'});
$template->param( picture => 1 ) if $picture;
if (C4::Context->preference('ExtendedPatronAttributes')) {
loop_reading => $issues,
activeBorrowerRelationship =>
( C4::Context->preference('borrowerRelationship') ne '' ),
+ RoutingSerials => C4::Context->preference('RoutingSerials'),
);
output_html_with_http_headers $input, $cookie, $template->output;