From ea7ecb2dc7bdb12582aac55ca7e92a416592cecd Mon Sep 17 00:00:00 2001 From: Mark Cooper Date: Mon, 22 Oct 2012 22:01:22 -0700 Subject: [PATCH] LP#1066629: Acq: Receiving an item should not change the status to "In Process" in many cases 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 Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm index 45156c0f7d..dcd33b2191 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -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( -- 2.11.0