|
Lines 610-615
sub handle_checkin {
Link Here
|
| 610 |
my ($self, $server) = @_; |
610 |
my ($self, $server) = @_; |
| 611 |
my $account = $server->{account}; |
611 |
my $account = $server->{account}; |
| 612 |
my $ils = $server->{ils}; |
612 |
my $ils = $server->{ils}; |
|
|
613 |
my $my_branch = $ils->institution; |
| 613 |
my ($current_loc, $inst_id, $item_id, $terminal_pwd, $item_props, $cancel); |
614 |
my ($current_loc, $inst_id, $item_id, $terminal_pwd, $item_props, $cancel); |
| 614 |
my ($patron, $item, $status); |
615 |
my ($patron, $item, $status); |
| 615 |
my $resp = CHECKIN_RESP; |
616 |
my $resp = CHECKIN_RESP; |
|
Lines 621-626
sub handle_checkin {
Link Here
|
| 621 |
$item_id = $fields->{(FID_ITEM_ID)}; |
622 |
$item_id = $fields->{(FID_ITEM_ID)}; |
| 622 |
$item_props = $fields->{(FID_ITEM_PROPS)}; |
623 |
$item_props = $fields->{(FID_ITEM_PROPS)}; |
| 623 |
$cancel = $fields->{(FID_CANCEL)}; |
624 |
$cancel = $fields->{(FID_CANCEL)}; |
|
|
625 |
if ($current_loc) { |
| 626 |
$my_branch = $current_loc;# most scm do not set $current_loc |
| 627 |
} |
| 624 |
|
628 |
|
| 625 |
$ils->check_inst_id($inst_id, "handle_checkin"); |
629 |
$ils->check_inst_id($inst_id, "handle_checkin"); |
| 626 |
|
630 |
|
|
Lines 629-635
sub handle_checkin {
Link Here
|
| 629 |
syslog("LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id}); |
633 |
syslog("LOG_WARNING", "received no-block checkin from terminal '%s'", $account->{id}); |
| 630 |
$status = $ils->checkin_no_block($item_id, $trans_date, $return_date, $item_props, $cancel); |
634 |
$status = $ils->checkin_no_block($item_id, $trans_date, $return_date, $item_props, $cancel); |
| 631 |
} else { |
635 |
} else { |
| 632 |
$status = $ils->checkin($item_id, $trans_date, $return_date, $current_loc, $item_props, $cancel); |
636 |
$status = $ils->checkin($item_id, $trans_date, $return_date, $my_branch, $item_props, $cancel); |
| 633 |
} |
637 |
} |
| 634 |
|
638 |
|
| 635 |
$patron = $status->patron; |
639 |
$patron = $status->patron; |
|
Lines 647-653
sub handle_checkin {
Link Here
|
| 647 |
# apparently we can't trust the returns from Checkin yet (because C4::Circulation::AddReturn is faulty) |
651 |
# apparently we can't trust the returns from Checkin yet (because C4::Circulation::AddReturn is faulty) |
| 648 |
# So we reproduce the alert logic here. |
652 |
# So we reproduce the alert logic here. |
| 649 |
if (not $status->alert) { |
653 |
if (not $status->alert) { |
| 650 |
if ($item->destination_loc and $item->destination_loc ne $current_loc) { |
654 |
if ($item->destination_loc and $item->destination_loc ne $my_branch) { |
| 651 |
$status->alert(1); |
655 |
$status->alert(1); |
| 652 |
$status->alert_type('04'); # no hold, just send it |
656 |
$status->alert_type('04'); # no hold, just send it |
| 653 |
} |
657 |
} |
| 654 |
- |
|
|