# $self->{hold_patron_name} = $name; # TODO: consider caching
return $name;
}
+
+sub hold_patron_bcode {
+ my $self = shift or return;
+ my $borrowernumber = (@_ ? shift: $self->hold_patron_id()) or return;
+ my $holder = GetMember($borrowernumber, 'borrowernumber');
+ if ($holder) {
+ if ($holder->{cardnumber}) {
+ return $holder->{cardnumber};
+ }
+ }
+ return;
+}
+
sub destination_loc {
my $self = shift or return;
my $hold = $self->next_hold();
$resp .= maybe_add(FID_COLLECTION_CODE, $item->collection_code );
$resp .= maybe_add(FID_CALL_NUMBER, $item->call_number );
$resp .= maybe_add(FID_DESTINATION_LOCATION, $item->destination_loc );
- $resp .= maybe_add(FID_HOLD_PATRON_ID, $item->hold_patron_id );
+ $resp .= maybe_add(FID_HOLD_PATRON_ID, $item->hold_patron_bcode );
$resp .= maybe_add(FID_HOLD_PATRON_NAME, $item->hold_patron_name );
if ($status->hold and $status->hold->{branchcode} ne $item->destination_loc) {
warn 'SIP hold mismatch: $status->hold->{branchcode}=' . $status->hold->{branchcode} . '; $item->destination_loc=' . $item->destination_loc;