SIP2 support for checkin local holds as transits
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 14 Jul 2011 20:49:14 +0000 (16:49 -0400)
committerJason Etheridge <jason@esilibrary.com>
Wed, 27 Jul 2011 20:36:54 +0000 (16:36 -0400)
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/examples/oils_sip.xml.example
Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/Checkin.pm

index 8adecf8..fa1e19d 100644 (file)
                     <event>COPY_ALERT_MESSAGE</event>
                 </checkout_override>
 
+                <!-- If uncommented, SIP2 checkins will capture local holds as transits, instead of marking as ready for pickup. -->
+                <!--
+                <checkin_hold_as_transit>1</checkin_hold_as_transit>
+                -->
+
                 <!-- If uncommented, overrides the legacy_script_support value in opensrf.xml for SIP. -->
                 <!--
                 <legacy_script_support>false</legacy_script_support>
index 42a689c..cee4fc5 100644 (file)
@@ -29,6 +29,8 @@ my %fields = (
 #   hold             => undef,
 );
 
+my $hold_as_transit = 0;
+
 sub new {
     my $class = shift;;
     my $self = $class->SUPER::new(@_);              # start with an Transaction object
@@ -41,6 +43,8 @@ sub new {
 
     $self->load_override_events;
 
+    $hold_as_transit = OpenILS::SIP->config->{implementation_config}->{checkin_hold_as_transit};
+
     return bless $self, $class;
 }
 
@@ -77,6 +81,7 @@ sub do_checkin {
     my $phys_location = $sip_handler->{login_session}->ws_ou;
 
     my $args = {barcode => $self->{item}->id};
+    $args->{hold_as_transit} = 1 if $hold_as_transit;
 
     if($return_date) {
         # SIP date format is YYYYMMDD.  Translate to ISO8601