added ROUTE_COPY event and returning it from the hold.capture method
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 15 Dec 2005 16:52:22 +0000 (16:52 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 15 Dec 2005 16:52:22 +0000 (16:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2405 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/ils_events.xml
Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm

index dc0cb93..5bf22f7 100644 (file)
@@ -13,6 +13,7 @@
        <event code='0' textcode='SUCCESS'>
                <desc>No errors or unexpected events occurred</desc>
        </event>
+
        <event code='1000' textcode='LOGIN_FAILED'>
                <desc>
                        User login failed.  Why the login failed is not specified.
                </desc>
        </event>
 
+       <event code='1503' textcode='BILLING_NOT_FOUND'>
+               <desc>
+                       Someone attempted to retrieve a transit object from the 
+                       system and the object was not found.
+               </desc>
+       </event>
+
+       <event code='1700' textcode='ROUTE_COPY'>
+               <desc>
+                       A copy needs to be routed to a different location       
+               </desc>
+       </event>
 
 
        <event code='2000' textcode='BAD_PARAMS'>
index 7a09232..d3a90dc 100644 (file)
@@ -471,7 +471,7 @@ sub fetch_hold_transit_by_hold {
 
 
 sub fetch_copy_by_barcode {
-       my( $self, $barcode ) = $_;
+       my( $self, $barcode ) = @_;
        my( $copy, $evt );
 
        $logger->debug("Fetching copy by barcode $barcode from storage");
index b6b9c9a..2460c4c 100644 (file)
@@ -367,14 +367,9 @@ sub capture_copy {
 
        $apputils->commit_db_session($session);
 
-       my $payload = { 
-               copy => $copy,
-               route_to => $hold->pickup_lib,
-               record => $title,
-               hold => $hold, 
-       };
-
-       return OpenILS::Event->new('SUCCESS', payload => $payload );
+       my $payload = { copy => $copy, record => $title, hold => $hold, };
+
+       return OpenILS::Event->new('ROUTE_COPY', route_to => $hold->pickup_lib, payload => $payload );
 }
 
 sub _build_hold_transit {