Report the new value for a copy's circ_lib when it's a floating copy
whose circ_lib is modified during checkin.
This affects the AQ field of the SIP checkin (10) message.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
$copy = $resp->{payload}->{copy} || '';
}
+ if ($copy) {
+ # Checkin of floating copies changes the circ lib.
+ # Update our SIP "item" to reflect the change.
+
+ if ($copy->circ_lib != $self->item->{copy}->circ_lib->id) {
+ syslog('LOG_INFO', "OILS: updating copy circ lib after checkin");
+
+ $self->item->{copy}->circ_lib(
+ OpenILS::SIP->editor()
+ ->retrieve_actor_org_unit($copy->circ_lib)
+ );
+ }
+ }
+
if ($self->item->hold) {
my ($pickup_lib_id, $pickup_lib_sn);