LP#1066629: Acq: Receiving an item should not change the status to "In Process" in...
authorMark Cooper <markchristophercooper@gmail.com>
Tue, 23 Oct 2012 05:01:22 +0000 (22:01 -0700)
committerBen Shum <bshum@biblio.org>
Wed, 24 Oct 2012 03:46:42 +0000 (11:46 +0800)
As suggested, when received, restrict copy status update for lineitem copies to only those that were on-order. Otherwise copies may have the status set to 'In Process' inappropriately.

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm

index a5f5bfe..7c66162 100644 (file)
@@ -713,7 +713,8 @@ sub receive_lineitem_detail {
 
     if ($lid->eg_copy_id) {
         my $copy = $e->retrieve_asset_copy($lid->eg_copy_id) or return 0;
-        $copy->status(OILS_COPY_STATUS_IN_PROCESS);
+        # only update status if it hasn't already been updated
+        $copy->status(OILS_COPY_STATUS_IN_PROCESS) if $copy->status == OILS_COPY_STATUS_ON_ORDER;
         $copy->edit_date('now');
         $copy->editor($e->requestor->id);
         $copy->creator($e->requestor->id) if $U->ou_ancestor_setting_value(