From: Tiffany Little Date: Fri, 18 Jun 2021 18:33:50 +0000 (-0400) Subject: LP1928003 Protect real copies from auto-deletion by cancelling acq line items X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f54a8acb38aa44221d626afa47eccb567f2acb21;p=Evergreen.git LP1928003 Protect real copies from auto-deletion by cancelling acq line items Signed-off-by: Tiffany Little Signed-off-by: Mike Rylander --- 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 104cf71fc5..377a9b45e0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm @@ -3176,7 +3176,7 @@ sub cancel_lineitem { # gathering any real copies for deletion # if there is a copy ID and the cancel reason keeps debits, # do not delete. - if ($lid->eg_copy_id && ! $U->is_true($cancel_reason->keep_debits)) { + if ($lid->eg_copy_id && ! $U->is_true($cancel_reason->keep_debits) && $lid->eg_copy_id->status == OILS_COPY_STATUS_ON_ORDER) { $lid->eg_copy_id->isdeleted('t'); push @$copies, $lid->eg_copy_id; }