my $data;
if ($item) {
- $data = $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert );
+ $data = $circ->do_checkin( $current_loc, $return_date, $cv_triggers_alert, $checked_in_ok );
}
else {
$circ->alert(1);
} elsif ( !$item->{patron} ) {
if ( $checked_in_ok ) { # Mark checkin ok although book not checked out
$circ->ok( 1 );
- $circ->alert( 0 );
syslog("LOG_DEBUG", "C4::SIP::ILS::Checkin - using checked_in_ok");
} else {
$circ->screen_msg("Item not checked out");
my $branch = shift;
my $return_date = shift;
my $cv_triggers_alert = shift;
+ my $checked_in_ok = shift;
if (!$branch) {
$branch = 'SIP2';
$debug and warn "do_checkin() calling AddReturn($barcode, $branch)";
my ($return, $messages, $issue, $borrower) = AddReturn($barcode, $branch, undef, dt_from_string($return_date));
- $self->alert(!$return);
+ if ($checked_in_ok){
+ $debug and warn 'not raising alert when AddReturn() does not return a value for $return due to $checked_in_ok being set to true';
+ }
+ else {
+ $self->alert(!$return);
+ }
# ignoring messages: NotIssued, WasLost, WasTransfered
# biblionumber, biblioitemnumber, itemnumber