Lines 70-82
sub do_checkin {
Link Here
|
70 |
|
70 |
|
71 |
$debug and warn "do_checkin() calling AddReturn($barcode, $branch)"; |
71 |
$debug and warn "do_checkin() calling AddReturn($barcode, $branch)"; |
72 |
my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date)); |
72 |
my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date)); |
73 |
if ($checked_in_ok){ |
73 |
|
74 |
$debug and warn 'not raising alert when AddReturn() does not return a value for $return due to $checked_in_ok being set to true'; |
74 |
if ( $checked_in_ok ) { |
75 |
} |
75 |
delete $messages->{NotIssued}; |
76 |
else { |
76 |
delete $messages->{LocalUse}; |
77 |
$self->alert(!$return); |
77 |
$return = 1 unless keys %$messages; |
78 |
} |
78 |
} |
79 |
# ignoring messages: NotIssued, WasLost, WasTransfered |
|
|
80 |
|
79 |
|
81 |
# biblionumber, biblioitemnumber, itemnumber |
80 |
# biblionumber, biblioitemnumber, itemnumber |
82 |
# borrowernumber, reservedate, branchcode |
81 |
# borrowernumber, reservedate, branchcode |
Lines 90-95
sub do_checkin {
Link Here
|
90 |
if ($messages->{withdrawn}) { |
89 |
if ($messages->{withdrawn}) { |
91 |
$self->alert_type('99'); |
90 |
$self->alert_type('99'); |
92 |
} |
91 |
} |
|
|
92 |
if ($messages->{ReturnOfLostItemBlocked}) { |
93 |
$self->alert_type('99'); |
94 |
} |
93 |
if ($messages->{Wrongbranch}) { |
95 |
if ($messages->{Wrongbranch}) { |
94 |
$self->{item}->destination_loc($messages->{Wrongbranch}->{Rightbranch}); |
96 |
$self->{item}->destination_loc($messages->{Wrongbranch}->{Rightbranch}); |
95 |
$self->alert_type('04'); # send to other branch |
97 |
$self->alert_type('04'); # send to other branch |
Lines 126-137
sub do_checkin {
Link Here
|
126 |
$self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} ); |
128 |
$self->{item}->hold_patron_id( $messages->{ResFound}->{borrowernumber} ); |
127 |
$self->{item}->destination_loc( $messages->{ResFound}->{branchcode} ); |
129 |
$self->{item}->destination_loc( $messages->{ResFound}->{branchcode} ); |
128 |
} |
130 |
} |
|
|
131 |
# ignoring messages: NotIssued, WasLost, WasTransfered |
129 |
|
132 |
|
130 |
my $alert = defined $self->alert_type; |
133 |
if ($cv_triggers_alert) { |
131 |
if ( $cv_triggers_alert ) { |
134 |
$self->alert( defined $self->alert_type ); # Overwrites existing alert value, should set to 0 if there is no alert type |
132 |
$self->alert($alert); # Overwrites existing alert value, should set to 0 if there is no alert type |
135 |
} |
133 |
} else { |
136 |
else { |
134 |
$self->alert($alert) if $alert; # Doesn't affect alert value unless an alert type is set |
137 |
$self->alert( !$return || defined $self->alert_type ); |
135 |
} |
138 |
} |
136 |
|
139 |
|
137 |
$self->ok($return); |
140 |
$self->ok($return); |
138 |
- |
|
|